CS FundamentalsModerateGATE CS

R(A, B) = {(1, x), (2, y), (3, z)} and S(B, C) = {(x, 5), (x, 6), (w, 7)}. How many tuples are in the natural full outer join of R and S?

  1. A. 5
  2. B. 4
  3. C. 6
  4. D. 3

Correct answer: A. 5

Matches: (1, x, 5) and (1, x, 6). Unmatched R tuples (2, y) and (3, z) are padded with NULL C, and the unmatched S tuple (w, 7) with NULL A: 2 + 2 + 1 = 5.

More DBMS and SQL questions

Exams that ask this topic