WELCOME

I welcome you all in the name of our savior Lord Jesus Christ!
May God bless U.

Saturday, June 5, 2010

Relational algebra

Introduction
Relational algebra received little attention until the publication of E.F. Codd's relational model of data in 1970. Codd proposed such algebra as a basis for database query languages.
Relational algebra is essentially equivalent in expressive power to relational calculus (and thus first-order logic); this result is known as Codd's theorem.
To overcome difficulties, Codd restricted the operands of relational algebra to finite relations only and also proposed restricted support for negation (NOT) and disjunction (OR). Analogous restrictions are found in many other logic-based computer languages.
Codd defined the term relational completeness to refer to a language that is complete with respect to first-order predicate calculus apart from the restrictions he proposed. In practice the restrictions have no adverse effect on the applicability of his relational algebra for database purposes.

Primitive operations
As in any algebra, some operators are primitive than the others, being definable in terms of the primitive ones, are derived. It is useful if the choice of primitive operators parallels the usual choice of primitive logical operators. Although it is well known that the usual choice in logic of AND, OR and NOT is somewhat arbitrary, Codd made a similar arbitrary choice for his algebra.
The five primitive operators of Codd's algebra are;
1.    Selection,
2.    Projection,
3.    Cartesian product (also called the cross product or cross join),
4.    The set union,
5.    The set difference

These five operators are fundamental in the sense that none of them can be omitted without losing expressive power. Many other operators have been defined in terms of these five.

No comments:

Post a Comment