QUEL query languages

QUEL query languages

QUEL is a relational database access language, similar in most ways to SQL. It was created as a part of the Ingres effort at University of California, Berkeley, based on Codd's earlier suggested but not implemented Data Sub-Language ALPHA. QUEL was used for a short time in most products based on the freely-available Ingres source code, most notably Informix.fact|date=July 2007 As Oracle and DB2 started taking over the market in the early 1980s, most companies then supporting QUEL moved to SQL instead.fact|date=July 2007

QUEL statements are always defined by "tuple variables", which can be used to limit queries or return result sets. Consider this example, taken from the original Ingres paper:

range of e is employee retrieve (comp = e.salary/ (e.age - 18)) where e.name = "Jones"

e is a tuple, defining a set of data, in this case all the rows in the employee table that have the first name "Jones". An equivalent SQL statement is:

select (e.salary/ (e.age - 18)) as comp from employee as e where e.name = "Jones"

QUEL is generally more "normalized" than SQL.fact|date=July 2007 Whereas every major SQL command has a format that is at least somewhat different from the others, in QUEL a single syntax is used for all commands.fact|date=July 2007

For instance, here is a sample of a simple session that creates a table, inserts a row into it, and then retrieves and modifies the data inside it and finally deletes the row that was added (assuming that name is a unique field).

create student(name = c10, age = i4, sex = c1, state = c2) range of s is student append to s (name = "philip", age = 17, sex = "m", state = "FL") retrieve (s.all) where s.state = "FL" replace s (age=s.age+1) retrieve (s.all) delete s where s.name="philip"

Here is a similar set of SQL statements:

create table student(name char(10), age int, sex char(1), state char(2)) insert into student (name, age, sex, state) values ("philip", 17, "m", "FL") select * from student where state = "FL" update student set age=age+1 select * from student delete student where name="philip"

Note that every command uses a unique syntax, and that even similar commands like INSERT and UPDATE use completely different styles.

Another feature of QUEL was a built-in system for moving records en-masse into and out of the system. Consider this command:

copy student(name=c0, comma=d1, age=c0, comma=d1, sex=c0, comma=d1, address=c0, nl=d1)
into "/student.txt"

which creates a comma-delimited file of all the records in the student table. The d1 indicates a delimiter, as opposed to a data type. Changing the into to a from reverses the process. Similar commands are available in many SQL systems, but usually as external tools, as opposed to being internal to the SQL language. This makes them unavailable to stored procedures.

With these differences, however, the two languages are largely the same.fact|date=July 2007

ee also

* Tutorial D
* D (data language specification)
* D4 (programming language) (an implementation of D)
* Relational algebra
* Relational calculus

External links

* [http://www.ils.unc.edu/~dwest/inls258/Non-SQL.html Non SQL Query Languages] , by Antoni Kokot and David West
* C. J. Date: [http://www.cs.duke.edu/~junyang/courses/cps216-2003-spring/papers/date-1983.pdf A Critique of the SQL Database Language] . SIGMOD Record 14(3): 8-54, 1984.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Quel — may refer to:* QUEL query languages, a relational database access language * Quel, La Rioja, a municipality in La Rioja, Spain …   Wikipedia

  • Query language — Query languages are computer languages used to make queries into databases and information systems. Broadly, query languages can be classified according to whether they are database query languages or information retrieval query languages. The… …   Wikipedia

  • Object Query Language — (OQL) is a query language standard for object oriented databases modeled after SQL. OQL was developed by the Object Data Management Group (ODMG). Because of its overall complexity no vendor has ever fully implemented the complete OQL. OQL has… …   Wikipedia

  • Contextual Query Language — (CQL), previously known as Common Query Language,[1] is a formal language for representing queries to information retrieval systems such as search engines, bibliographic catalogs and museum collection information. Based on the semantics of Z39.50 …   Wikipedia

  • Molecular Query Language — The Molecular Query Language (MQL) was designed to allow more complex, problem specific search methods in chemoinformatics.[vague] ((more than what?)) The query language is based on an extended Backus–Naur form (EBNF) using JavaCC. In contrast to …   Wikipedia

  • SQL — This article is about the database language. For the airport with IATA code SQL, see San Carlos Airport. SQL Paradigm(s) Multi paradigm Appeared in 1974 Designed by Donald D. Chamberlin Raymond F. Boyce Developer …   Wikipedia

  • Database management system — A database management system (DBMS) is a software package with computer programs that control the creation, maintenance, and the use of a database. It allows organizations to conveniently develop databases for various applications by database… …   Wikipedia

  • PostgreSQL — Developer(s) PostgreSQL Global Development Group Stable release 9.1.1[1] / 9.0.5 …   Wikipedia

  • MultiDimensional eXpressions — (MDX) is a query language for OLAP databases, much like SQL is a query language for relational databases. It is also a calculation language, with syntax similar to spreadsheet formulas. Contents 1 Background 2 History 2.1 mdXML …   Wikipedia

  • Datalog — is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when Hervé Gallaire and Jack Minker …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”