CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

R(A, B) = {(1, 1), (1, 2), (1, 4), (2, 2), (4, 2), (4, 4)} and S(B, C) = {(1, 5), (3, 5), (3, 6), (4, 7)}. What is π_A(R) − π_A(R ⋈ S)?

  1. A. ∅
  2. B. {2}
  3. C. {1, 4}
  4. D. {1, 2, 4}

Correct answer: B. {2}

This keeps A values ALL of whose tuples fail to join. An A value with at least one joining B is removed entirely, so the answer is {2}, not merely the A values of non-joining tuples.

More DBMS and SQL questions

Exams that ask this topic