Q1) Data Management (20 marks)
Questions part 1 and part 2 refer to the Supplier-Part-Jobs database. The scheme for this database is as follows: CourseNana.COM
- suppliers (s_id, name, status, city) -- the information about suppliers
- parts (p_id, name, colour, weight, city) -- the information about parts
- job (j_id, name, city) -- the information about jobs
- supplier_inventory (s_id, p_id, quantity) -- the quantity of each part that suppliers currently hold
- requests (s_id, p_id, j_id, quantity) -- the amount of each part requested from a supplier for a job
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
a) (2 marks)
b) (2 marks)
c) (2 marks) Describe in English what the following RA computes: CourseNana.COM