Chapter Summary
n The relational algebra is a (high-level) procedural language: it can be used to tell the DBMS how to build a
new relation from one or more relations in the database. The relational calculus is a non-procedural language:
it can be used to formulate the definition of a relation in terms of one or more database relations. However,
formally the relational algebra and relational calculus are equivalent to one another: for every expression in
the algebra, there is an equivalent expression in the calculus (and vice versa).
n The relational calculus is used to measure the selective power of relational languages. A language that can
be used to produce any relation that can be derived using the relational calculus is said to be relationally
complete. Most relational query languages are relationally complete but have more expressive power than the
relational algebra or relational calculus because of additional operations such as calculated, summary, and
ordering functions.
n The five fundamental operations in relational algebra, Selection, Projection, Cartesian product, Union, and
Set difference, perform most of the data retrieval operations that we are interested in. In addition, there
are also the Join, Intersection, and Division operations, which can be expressed in terms of the five basic
operations.
n The relational calculus is a formal non-procedural language that uses predicates. There are two forms of the
relational calculus: tuple relational calculus and domain relational calculus.
n In the tuple relational calculus, we are interested in finding tuples for which a predicate is true. A tuple
variable is a variable that ‘ranges over’ a named relation: that is, a variable whose only permitted values are
tuples of the relation.
n In the domain relational calculus, domain variables take their values from domains of attributes rather than
tuples of relations.
n The relational algebra is logically equivalent to a safe subset of the relational calculus (and vice versa).
n Relational data manipulation languages are sometimes classified as procedural or non-procedural, transformoriented,
graphical, fourth-generation, or fifth-generation.
Reviewed by Shopping Sale on 22:21 Rating: 5

No comments:

Powered by Blogger.