Database Reference
In-Depth Information
In relational calculus, the user describes what is required; the system is left to decide
how to service the user's request. Relational calculus is therefore said to be descriptive,
while relational algebra is said to be prescriptive. As you shall see, this distinction is only
superficial. More fundamentally, relational calculus and relational algebra are mutual
equivalents: any algebra formation has a calculus equivalent and vice versa. Relational
calculus is derived from a branch of mathematics called predicate calculus. It uses the
idea of tuple variable (range variable). A tuple variable refers to a row of a relation at any
given time. The relation is called the range. The Ingres language QUEL is similar to the
original relational calculus language ALPHA, introduced by Codd.
Referencing an attribute is done by the following notation:
Example 2a:
Tuple variables may be implicit or explicit in SQL, as illustrated below:
Example 2b:
Tuple variables may also be implicit or explicit in QUEL, as illustrated below:
Example 2c:
Relational calculus of this sort is sometimes referred to as tuple calculus. An
alternate domain calculus, based on domains, has been developed by Lacroix and
Pirotte [Lacroix, 1977]. Query by example (QBE) is a language developed on this (domain
calculus). This course focuses on the former, and not the latter.
 
Search WWH ::




Custom Search