Terabyte online databases, consisting of billions of records,
are becoming common as the price of online storage decreases.
These databases are often represented and manipulated using the
SQL relational model. A relational database consists of
relations (files in COBOL terminology) that in turn contain
tuples (records in COBOL terminology). All the tuples in a
relation have the same set of attributes (fields in COBOL
terminology). Relations are created, updated, and queried by
writing SQL statements. These statements are syntactic sugar for
a simple set of operators chosen from the relational algebra.
Select project, here called scan, is the simplest and most
common operator – it produces a row-and column subset of a
relational table. A scan of relation R using predicate P and
attribute list L produces a relational data stream as output.
The scan reads each tuple, t, of R and applies the predicate P
to it. If P(t) is true, the scan discards any attributes of t
not in L and inserts the resulting tuple in the s