CMPT-354: Database Systems and Structures

Official Query Language Crib Sheet


You will be given a copy of this with the course exams.

Relational algebra: Duplicates are eliminated, general expressions are formed out of smaller subexpressions using:



Tuple relational calculus:

Nonprocedural language. A query in the tuple relational calculus is expressed as

i.e. the set of tuples for which predicate is true.

Logical connectives and , plus existential and universal quantifiers ( and ) are allowed. Implies () also used (If , then ).

A sample query:



Domain Relational Calculus:

An expression is of the form

where the represent domain variables, and is a formula.

Logical connectives and , plus existential and universal quantifiers ( and ) are allowed. Implies () also used (If , then ).

A sample query:



SQL: Typical query has the form:

where each represents an attribute, each a relation, and is a predicate.



QBE: Uses skeleton tables.

Sample query:



CMPT-354 main page

Last update: Oct. 16th, 1995. Page created and maintained by Osmar R. Zaļane