The project operation is a unary
operation that returns its argument relation with certain attributes
left out. Since a relation is a set, any duplicate rows are eliminated.
Projection is denoted by the Greek letter pi ( ).
The attributes that wish to be appear in the result are listed as
a subscript to . The argument
relation follows in parentheses. For example, the query to list
all loan numbers and the amount of the loan is written as:
loan-number,
amount (loan)
The
result of the query is the following:
loan-number
|
amount
|
L-17
L-23
L-15
L-14
L-93
L-11
L-16
|
1000
2000
1500
1500
500
900
1300
|
Another
more complicated example query is to find those customers who live
in Harrison is written as:
customer-name
( customer-city
= "Harrison" (customer))
|