CS FundamentalsHardGATE CS · DBMS

R(A, B) = {(a1, b1), (a1, b2), (a2, b1), (a2, b3), (a3, b1), (a3, b2), (a3, b3), (a4, b1), (a4, b2)} and S(B) = {b2, b3}. What is R ÷ S?

  1. A. ∅
  2. B. {a1, a2, a4}
  3. C. {a3}
  4. D. {a1, a2, a3, a4}

Correct answer: C. {a3}

R ÷ S returns the A values paired with EVERY B in S (b2, b3). The answer is {a3}; values paired with just some of them belong to the 'any' (semi-join) answer.

More DBMS and SQL questions

Exams that ask this topic