σ(Condition)(R)
|
|
Answer:
| σ (dno = 4) (employee) |
|---|
|
Answer:
| σ (salary > 30000) (employee) |
|---|
Answer:
| σ (dno = 4 and salary > 30000) (employee) |
|---|
OR:
| σ (salary > 30000) ( σ (dno = 4) (employee) ) |
|---|
π (attribute-list) (R) |
Effect:
|
| π ssn (employee) |
|---|
|
| π sex (employee) |
|---|
The following diagram shows the result graphically (hopefully, it will illustrates the concept of projection unambiguously):
|
Notes:
|
|
Employee:
ssn fname lname dno
--------- ------ -------- -----------
123456789 John Smith 5
333445555 Frankl Wong 5
999887777 Alicia Zelaya 4
987654321 Jennif Wallace 4
Department:
dname dnumber mgrssn mgrstartdate
--------------- ----------- --------- ------------
Research 5 333445555 22-MAY-78
Administration 4 987654321 01-JAN-85
|
Note:
|
A ⋈C B = σC ( A × B ) |
Employee:
ssn fname lname dno
--------- ------ -------- -----------
123456789 John Smith 5
333445555 Frankl Wong 5
999887777 Alicia Zelaya 4
987654321 Jennif Wallace 4
Department:
dname dnumber mgrssn mgrstartdate
--------------- ----------- --------- ------------
Research 5 333445555 22-MAY-78
Administration 4 987654321 01-JAN-85
|