Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R…
2006
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join r1⋈ r2 is :
Answer: A. 2000 — The join r1 ⋈ r2 is performed on the common attribute R, which is the primary key of r2. Since P is the primary key of r1, it has 2000 unique values. The…
- A.
2000
- B.
2500
- C.
4500
- D.
5000
Attempted by 45 students.
Show answer & explanation
Correct answer: A
The join r1 ⋈ r2 is performed on the common attribute R, which is the primary key of r2. Since P is the primary key of r1, it has 2000 unique values. The maximum number of tuples in the join occurs when every tuple in r1 matches with a tuple in r2. However, since R is the primary key of r2, each value of R can appear at most once in r2. Therefore, the maximum number of tuples in the join is limited by the smaller relation size or the uniqueness constraint. The correct maximum size of the join is 2000, as each tuple in r1 can match at most one tuple in r2. Thus, the answer 2000 is correct.
Explore the full course: Ssc Je Imd Scientific Assistant Computer Science