CASE 1:
Here in case 1 i am making 2 tables with not a single column common between them.
imagine a relation "HarryPotter" with 1 attribute "house " and another attribute "category" and containing 4 tuples.
HarryPotter
Houses |
Category |
Gryffindor |
Movie |
Hufflepuff |
Movie |
Slytherin |
Movie |
Ravenclaw |
Movie |
imagine a relation "Game of Thrones" with 1 attribute "house " and another attribute "category" containing 3 tuples
Game of Thrones
Houses |
Category |
Stark |
Tv series |
Lannister |
Tv series |
Targaryan |
Tv series |
what happens when you unify them?
Houses |
Category |
Gryffindor |
Movie |
Hufflepuff |
Movie |
Slytherin |
Movie |
Ravenclaw |
Movie |
Stark |
Tv series |
Lannister |
Tv series |
Targaryan |
Tv series |
You get (4+3) = 7 tuples----> max:(m+n) where m=4 and n=3.
CASE 2
Here i make 2 tables with tuples common between them.
Table 1:
Houses |
Category |
Gryffindor |
Movie |
Hufflepuff |
Movie |
Stark |
Tv series |
Table 2:
Houses |
Category |
Gryffindor |
Movie |
Hufflepuff |
Movie |
Stark |
Tv series |
Lannister |
Tv series |
Targaryan |
Tv series |
When you unify them you get.What happens when you unify Table 1 and Table2?
Notice here 3 tuples are getting repeated.We consider them only once. So whats the result?
Houses |
Category |
Gryffindor |
Movie |
Hufflepuff |
Movie |
Stark |
Tv series |
Lannister |
Tv series |
Targaryan |
Tv series |
see Table 1 had 3 tuples and Table 2 had 5 tuples, End result 5 tuples-->min is max(5,3) = 5.
ps: although I believe in some cases it can be more than 5, but here our objective is to find the closest appropriate answer.