CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

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

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

Correct answer: C. {1, 4}

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 {1, 4}, not merely the A values of non-joining tuples.

More DBMS and SQL questions

Exams that ask this topic