Lab 9 - RA and SQL
Lab 9 - RA and SQL
The catalog relation lists the prices charged for parts by suppliers. Write the following
queries in relational algebra and in SQL.
1. Find the names of the suppliers who supply some red part.
2. Find the sids of suppliers who supply some red or green part.
3. Find the sids of suppliers who supply some red and some green part.
5. Find the pids of parts supplied by every supplier at less than P200. (If any supplier either
does not supply the part or charges more than P200 for it, the part is not selected).