Consider the following schema:
Supplier(sid: integer, sname: string, address: string)
Part(pid: integer, pname: string, colour: string)
Catalog(sid: integer, pid: integer, cost: real)
The relation Supplier stores suppliers and the key of that relation is sid. The relation
Part stores parts, and pid is the key of that relation. Finally, Catalog stores which
supplier supplies which part at which cost. The key is the combination of the two
attributes sid and pid.
A. Write the queries in relational algebra for the following:
1. Find the names of suppliers who supply some red part. (0.25)
2. Find the IDs of suppliers who supply some red or green part. (0.25)
3. Find the IDs of suppliers who supply some red part or are based at 21 George
Street. (0.50)
4. Find the IDs of suppliers who supply some red part and some green part. (0.50)
B. For each of the following relational algebra queries, write in English what they mean.
1. πsname(σcolour=’red’(Part) σcost<100 (Catalog) Supplier) (0.25)
2. πsname(πsid(σcolour=’red’(Part) σcost<100 (Catalog)) Supplier) (0.25)
ي جماعة اللي يعرف حل السؤال التاني للواجب ي ريت ينزلو