Joe Celko's Data and Databases: Concepts in Practice

Chapter 19: Basic Relational Operations

Chapter 19: Basic Relational Operations
Overview
Dr. E. F. Codd defined a simple set of operators for relational tables in his original work. The goal for the set of operators was to be both complete and minimal; mathematicians like those properties. These original operators were the basis for SQL statements and expressions, but SQL has extended this set to include operators that are useful to programmers.
You can classify the operators as
1. operating on a whole table without regard to the nature of the rows
2. operating on the rows of a table
3. operating on the columns within the rows of a table
19.1 Projection
A projection operates on a single table to produce a new table by removing columns in the original table. The term was originally used in mathematics as a weak inverse operation for the Cartesian product. That is, you could get one of the original domains out of a tuple.
19.2 Restriction
A restriction operates on a single table to produce a new table by removing rows in the original table. The rule for removing rows is given as a logical predicate. The rule in SQL is that you keep the rows for which the predicate tested TRUE (i.e., discard those that tested FALSE or UNKNOWN ).
19.3 Computations
Computations were not part of Codd?s original operators, but you need them if you are going to do any real work. You can think of them as the opposite of...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Scanning Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.