edited by
16,787 views
38 votes
38 votes

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. $m+n$ and $0$
  2. $mn$ and $0$
  3. $m+n$ and $|m-n|$
  4. $mn$ and $m+n$
edited by

1 Answer

Best answer
50 votes
50 votes

Answer is B.

The maximum number of tuples can be $mn. $ This happens in two cases. 
Case 1: if there is a common attribute between $R$ and $S$, and every row of $r$ matches with the each row of $s$- i.e., it means, the join attribute has the same value in all the rows of both $r$ and $s$,
Case 2: If there is no common attribute between $R$ and $S.$

The minimum number of tuples is $0. $ This happens when there is a common attribute between $R$ and $S$ and it has no common value between the two relations. 

selected by
Answer:

Related questions

25 votes
25 votes
1 answer
2
Kathleen asked Sep 23, 2014
4,009 views
Let $R = (A, B, C, D, E, F)$ be a relation scheme with the following dependencies $C \rightarrow F, E \rightarrow A, EC \rightarrow D, A \rightarrow B $. Which one of the...
3 votes
3 votes
3 answers
3
go_editor asked Feb 8, 2018
1,793 views
Consider the set of relationsEMP (Employee-no. Dept-no, Employee-name, Salary)DEPT (Dept-no. Dept-name, Location)Write an SQL query to:Calculate, for each department numb...