4,972 views
6 6 votes
Why is the minimum number of tuples in full outer join equal to max (m,n) ?

2 Answers

20 20 votes
If nothing matches while applying full outer join the resultant would be (m+n).

Firstly, there is a misconception that min. would occur when nothing would match.

Min. would occur when values in tuples actually matches! And, then  it would be max.(m,n).

E.g.

Consider relation A with 3 tuples and B with 5 tpl.

So, misconception says min of outer join would be if there's no match. i.e m+n = 5+3 = 8 tuples. but this is not the case to get minimum.
To get min. in full outer join:

Consider, 3 out of 3 in A matches with B's tuples

 this time, resultant relation would have: 3(matched) + 2(unmatched) tuple = 5 tuples. (which is less than 8)

This is the min. case, when EVERY tuple in one of the relational table matches with tuples in other. Hence, max of (m,n).

I hope this explanation helps.
0 0 votes
If in R and S all attributes are common only then, minimum number of tuples in full outer join equal to |RUS| because full outer join will behave as union.

max(|R|,|S|)<= |RUS| <= |R| + |S|

If in R and S all attributes are not common then minimum number of tuples is |R| + |S|.
Position:
Show:

Related questions

0 0 votes
1 1 answer
99
99 views
GO Classes asked Sep 25
99 views
Consider $\mathrm{A}(\mathrm{c1},\mathrm{c2},\mathrm{c3})$ and $\mathrm{B}(\mathrm{c1},\mathrm{c2},\mathrm{c3})$, where $\mathrm{c1}$ is the primary key of each relation....
0 0 votes
1 1 answer
96
96 views
GO Classes asked Sep 25
96 views
Consider :$$\begin{aligned}\begin{gathered}\mathrm{Customer} \\[-2pt]\begin{array}{|c|c|}\hline\mathrm{cid} & \mathrm{name} \\\hline1 & \mathrm{Joe} \\2 & \mathrm{Betty} ...
5 5 votes
4 answers 4 answers
5.3k
5.3k views
learncp asked Sep 5, 2015
5,260 views
Why is the maximum number of tuples in full outer join equal to m*n, where m is the number of attributes in one relation and n is the attribute count in other ?Can someon...
1 1 vote
1 1 answer
91
91 views
GO Classes asked Sep 25
91 views
Consider $\mathrm{Homes}(\mathrm{home\_id},\mathrm{city},\ldots)$ and $\mathrm{Transactions}(\mathrm{home\_id},\mathrm{sale\_price},\ldots)$.We want every home in Berkele...