For the following relational algebra question, please use the schema defined below.
Students(sid, sname, year)
Companies(cid, cname, valuation)
Recruitment(sid, cid, position, salary, status)//sid is a foreign key referencing Students(sid), cid is a foreign key referencing
Companies(cid)
For the question, indicate which of the expressions gives the desired output. Note that the following table abbreviations are
being used: Students?S, Companies?C, Recruitment?R. Note that if a student has received an offer, the status field in
the Recruitment table will be the text "offer". Also note that some of the expressions are invalid, in which case they should
definitely not be marked in your answer.
Find the names of all students who have received at least one recruitment offer. Mark all that apply.
A. $\sigma_{status='offer'} (\Pi_{sname}(S) \times R)$
B. $\Pi_{sname}(\sigma_{status='offer'} (S \times R))$
C. $\Pi_{sname}(S \times \sigma_{status='offer'} (R))$
D. $\Pi_{sname}(\sigma_{status='offer'} (S \times \Pi_{sid}(R))) $