CS FundamentalsHardGATE CS · Product placement

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

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

Correct answer: B. 7 and 8

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

More DBMS and SQL questions

Exams that ask this topic