December 2013 Archive


An Algebra of Relational Operations

In order to start our study of operations on relations, we shall learn about a special algebra, called relational algebra that comprises some simple but powerful ways to construct new relations from given relations. When the given relations are stored data, then the constructed

Set Operations on Relations

The three most common operations on sets are union, intersection, and difference. We assume the reader is familiar with these operations, which are described as follows on arbitrary sets R and S:

Selection / Cartesian Product

The selection operator, applied to a relation R, creates a new relation with a subset of R's tuples. The tuples in the resulting relation are those that satisfy some condition C that involves the attributes of R. We denote this operation σc(R). The schema for the resulting relation is the

Natural Joins / Theta-Joins

More frequently than we want to take the product of two relations, we find a need to join them by pairing only those tuples that match in some way. The simplest kind of match is the natural join of two relations R and S, denoted R x S, in which we pair only those tuples from R

Combining Operations to Form Queries

If all we could do was to write single operations on one or two relations as queries, then relational algebra would not be as useful as it is. On the other hand, relational algebra, like all algebras, allows us to form expressions of arbitrary complexity by applying operators either to

Page 1 of 1 Previous 1 Next