GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 1.18

Bounds on join cardinality

Database Management Systems · Relational Algebra & Calculus · Full GATE CSE 1999 paper

GATE 1999, Q1.18 1 mark · MCQ
Report issue

Relational Algebra & Calculus

Question 1.18, GATE 1999: Relations R,S have m,n tuples. What are the maximum and minimum possible sizes of their join?
Tap to enlarge
Your answer
Answer & solution

Answer: B: mn and 0 (no official key was published)

A join selects qualifying pairs from R×S, which contains mn pairs. Therefore it cannot exceed mn. This upper bound occurs when every pair satisfies the join predicate. The minimum zero occurs when no pair satisfies it. Hence B gives the general possible extremes. This reasoning assumes an ordinary inner join with a condition that can permit or reject pairs. A fixed natural join on disjoint schemas is always the Cartesian product, so its minimum would not be zero for positive m,n; the question is the usual unrestricted join-bound comparison.

Original paper, page 2