Assume that you are given the database schema which represents the information a
ID: 3797665 • Letter: A
Question
Assume that you are given the database schema which represents the information about suppliers, parts and their inter-relationships in terms of order, where the primary keys are S# and P#:
Supplier(S#, Sname, Sstatus, Scity)
Part(P#, Pname, Pcolor, Pweight, Pcity)
SP_Order(S#, P#, Quantity)
Write the Relational Algebra expression for the following queries:
a.) retrieve the names of all the suppliers who are located in London
b.) retrieve the names of all the suppliers who supply (at least one red) part
Explanation / Answer
Here are the expressions:
a.)
SName= Scity = "London"(Supplier)
Sname(SName)