Part 1 Relational Algebra (6 marks)
Please evaluate the following relational algebra expressions on the following presented subset of the Supplier-Parts-Jobs database.
CourseNana.COM
Suppliers (S):
CourseNana.COM
s_id | name | status | city |
---|
S1 | Smith | 20 | London |
S2 | Jones | 10 | Paris |
S3 | Blake | 30 | Paris |
Parts (P):
CourseNana.COM
p_id | name | colour | weight | city |
---|
P1 | Nut | Red | 12.0 | London |
P2 | Bolt | Green | 17.0 | Paris |
P3 | Screw | Blue | 17.0 | Rome |
P4 | Screw | Red | 14.0 | London |
Jobs (J):
CourseNana.COM
j_id | name | city |
---|
J1 | Sorter | Paris |
J2 | Display | Rome |
J3 | OCR | Athens |
Requests (R):
CourseNana.COM
s_id | p_id | j_id | quantity |
---|
S1 | P1 | J1 | 200 |
S2 | P2 | J1 | 400 |
S2 | P3 | J2 | 250 |
S2 | P3 | J3 | 200 |
S3 | P3 | J1 | 300 |
S3 | P4 | J2 | 500 |
For a) and b) since you can't draw tables, please write your answer as comma separated values, including the column headers. e.g.
id, column2, column3
1, Trevor, Computing
2, James, Business
3, Sarah, Engineering
CourseNana.COM