CS FundamentalsHardGATE CS · Product placement

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

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

Correct answer: D. {a4}

R ÷ S returns the A values paired with EVERY B in S (b1, b2). 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