Consider the relations r₁(P, Q, R) and r₂(R, S, T) with primary keys P and R…
2024
Consider the relations r₁(P, Q, R) and r₂(R, S, T) with primary keys P and R respectively. The relation r₁ contains 2000 tuples and r₂ contains 2500 tuples. The maximum size of the join r₁ ⋈ r₂ is
- A.
2000
- B.
2500
- C.
4000
- D.
5000
Attempted by 110 students.
Show answer & explanation
Correct answer: A
The maximum size of the natural join r₁ ⋈ r₂ is determined by the relation with fewer tuples when joining on a foreign key. Here, r₁ has 2000 tuples and r₂ has 2500 tuples. Since R is the primary key in r₂, each value of R can appear at most once in r₂. When joining r₁ and r₂ on attribute R, each tuple from r₁ can match with at most one tuple from r₂. Therefore, the result cannot exceed 2000 tuples, which is the size of r₁. This occurs when every tuple in r₁ has a matching R value present in r₂.",