CS FundamentalsModerateGATE CS · Product placement

R(A, B) has 8 tuples. What is the number of tuples in R ⋈ R (natural join of R with itself), and in R × ρ_{S(C, D)}(R)?

  1. A. 64 and 64
  2. B. 8 and 64
  3. C. 8 and 8
  4. D. 16 and 64

Correct answer: B. 8 and 64

Joining R with itself on all attributes matches each tuple only with itself, giving R back (8). Renaming the attributes leaves no common attribute, so the join becomes a Cartesian product: 64.

More DBMS and SQL questions

Exams that ask this topic