CS FundamentalsHardGATE CS · Product placement

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

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

Correct answer: C. 5 and 7

R ⋈ S has 4 tuples; 1 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