Database Reference
In-Depth Information
difference(—),
join ( )
4.14.1 Restrict
Restrict( select) is an operator which takes one relation as input and produces a single rela-
tion as output. Restrict can be considered a 'horizontal slicer' in that it extracts rows from
the input relation matching a given condition and passes them to the output relation. It is
also known as selection operator.It is denoted by a symbol sigma (σ). The notation T where
c or σ c ( T ) is used, where T is a table expression, c is a condition. The selection operation
can use any of the comparison operations (=, !=, <=, <, >=, >).
Syntax for the restrict operator is as follows:
RESTRICT <table name> [WHERE <condition>] '!<result table>
Example 9:
In the following figure, only those rows are extracted from table product where
Qty on Hand is greater than 10.
Example 10:
To select all rows from product relation/ table where Qty on hand getaer than
10, we can write same as:
σ Qty on hand > 10 ( Product )
4.14.2 Project
The project operator takes a single relation as input and produces a single relation
as output. Project is a 'vertical slicer' in that it produces in the output relation a subset of
Search WWH ::




Custom Search