CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

R(A, B) = {(2, 1), (3, 1), (3, 3), (3, 4), (4, 4)} and S(B, C) = {(1, 5), (2, 5), (2, 7), (3, 7)}. How many tuples are in R ⟕ S (left outer join) and in R ⟗ S (full outer join)?

  1. A. 3 and 5
  2. B. 5 and 9
  3. C. 5 and 7
  4. D. 5 and 8

Correct answer: C. 5 and 7

R ⋈ S has 3 tuples; 2 R tuple(s) find no partner and are padded with NULL, giving 5. The full outer join also keeps 2 unmatched S tuple(s): 7.

More DBMS and SQL questions

Exams that ask this topic