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

2 Answers

20 votes
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 votes
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|.

Related questions

5 votes
5 votes
4 answers
1
learncp asked Sep 5, 2015
3,404 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...
0 votes
0 votes
1 answer
2
sourabh asked Jan 5, 2016
559 views
0 votes
0 votes
1 answer
3
Chirag arora asked Jun 29, 2018
427 views
Can any one explain this question
1 votes
1 votes
1 answer
4
raginibhayana asked Feb 15, 2022
774 views
why don't we use the projection operator in conditional join?