CS FundamentalsEasyGATE CS (PYQ pattern)

R(A, B) = {(1,a), (1,b), (2,a), (3,c), (4,a), (5,b), (5,c)} and S(B) is EMPTY. Using the standard definition R ÷ S = π_A(R) − π_A((π_A(R) × S) − R), how many tuples does R ÷ S contain?

  1. A. 0
  2. B. 5
  3. C. 7
  4. D. 1

Correct answer: B. 5

With S empty, π_A(R) × S is empty, so nothing is subtracted and the result is π_A(R) itself, which has 5 distinct A values. (Every A trivially 'has all' of the zero required B values.)

More DBMS and SQL questions

Exams that ask this topic