CS FundamentalsHardGATE CS

R(S, C) = {(1, a), (1, b), (2, a), (3, a), (3, b), (3, c), (4, b)}. What is R ÷ π_C(σ_{S = 1}(R))?

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

Correct answer: B. {1, 3}

The divisor is the set of C values of S = 1, i.e. {a, b}. Division keeps every S paired with both a and b: 1 and 3. Student 3 also has c, which does not matter.

More DBMS and SQL questions

Exams that ask this topic