Consider the join of a relation R with a relation S. If R has m tuples and S…
1999
Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples, then the maximum and minimum sizes of the join respectively are:
- A.
m+n and 0
- B.
mn and 0
- C.
m+n and m-n
- D.
mn and m+n
Attempted by 30 students.
Show answer & explanation
Correct answer: B
The correct answer is mn and 0.
A join of R and S is formed from matching pairs of tuples from the two relations. In the maximum case, every tuple of R can join with every tuple of S, so the result can contain m × n tuples.
In the minimum case, no tuple pair satisfies the join condition, so the join result can be empty, i.e. 0 tuples.
Therefore, the maximum and minimum sizes are mn and 0 respectively.