ISRO Scientist/Engineer CSE 2016Databases › Relational Algebra and ER Model
ISRO Scientist/Engineer CSE 2016 PYQ: Consider the join of a relation $R$ with a relation $S$. If $R$ has $m$ tuples and $S$ has $n$ tuples then…
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 0Correct answer
- C$m+n$ and $|m-n|$
- D$mn$ and $m+n$
Answer
(B) $mn$ and $0$
Approach
The join size depends on how many tuples of R match tuples of S on the common attribute(s). The maximum occurs when every tuple of R pairs with every tuple of S (Cartesian product), giving mn. The minimum occurs when no tuple of R matches any tuple of S, giving 0.
Reviewed by ISRO IQ Editorial Team.