Selection and projection
In relational terminology, selection is defined as
taking the horizontal subset of rows of a single table that satisfies
a particular condition. This kind of SELECT statement returns some
of the rows and all the columns in a table. Selection is implemented
through the WHERE clause of a SELECT statement, as the following figure
shows.
The result contains the same number of columns as the customer table,
but only a subset of its rows. In this example, DB-Access displays
the data from each column on a separate line.
In relational terminology, projection is defined as taking a vertical subset from the columns of a single table that retains the unique rows. This kind of SELECT statement returns some of the columns and all the rows in a table.
Projection is implemented through the projection list in
the Projection clause of a SELECT statement, as the following figure
shows.
The result contains the same number of rows
as the customer table, but it projects only a
subset of the columns in the table. Because only a small amount of
data is selected from each row, DB-Access is
able to display all of the data from the row on one line.
The most common kind of SELECT statement uses both selection and
projection. A query of this kind returns some of the rows and some
of the columns in a table, as the following figure shows.
Query result contains a subset
of the rows and a subset of the columns in the customer table.