QUEL is a
relational database
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
query language, based on
tuple relational calculus, with some similarities to
SQL. It was created as a part of the
Ingres
Jean-Auguste-Dominique Ingres ( , ; 29 August 1780 – 14 January 1867) was a French Neoclassicism, Neoclassical Painting, painter. Ingres was profoundly influenced by past artistic traditions and aspired to become the guardian of academic ...
DBMS 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 in an implementation called POSTQUEL supported by
POSTGRES. As
Oracle
An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination.
Description
The word '' ...
and
DB2
Db2 is a family of data management products, including database servers, developed by IBM. It initially supported the relational model, but was extended to support object–relational features and non-relational structures like JSON and ...
gained market share in the early 1980s, most companies then supporting QUEL moved to SQL instead. QUEL continues to be available as a part of the Ingres DBMS, although no QUEL-specific language enhancements have been added for many years.
Usage
QUEL statements are always defined by ''tuple variables'', which can be used to limit queries or return result sets. Consider this example, taken from one of the first original Ingres papers:
range of E is EMPLOYEE
retrieve into W
(COMP = E.Salary / (E.Age - 18))
where E.Name = "Jones"
Here E is a tuple variable that ranges over the EMPLOYEE relation, and all tuples in that relation are found which satisfy the qualification `E.Name = "Jones"`. The result of the query is a new relation W, which has a single domain