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

  1. A.

    m+n and 0

  2. B.

    mn and 0

  3. C.

    m+n and ∣m−n|

  4. D.

    mn and m+n

Attempted by 211 students.

Show answer & explanation

Correct answer: B

Answer: m × n (maximum) and 0 (minimum).

  • Maximum (m × n): The largest possible join size is m × n, which occurs when every tuple in R joins with every tuple in S. This happens for a cross join (no join condition) or when, for the join attribute(s), all tuples in both relations share the same value so every pair matches.

  • Minimum (0): The smallest possible join size is 0, which happens when no tuple pair from R and S satisfies the join condition (for example, when there is a common attribute but the two relations have no common values).

Note: If there are no common attributes and the operation is a natural or cross join, the result is always the Cartesian product of size m × n (so minimum equals maximum in that special case).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir