CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

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

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

Correct answer: A. {a4}

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

More DBMS and SQL questions

Exams that ask this topic