808 views

Say we have two relations R (a,b,c) and S (b,d,e).

Now, R has 200 tuples and S has 300 tuples.

What will be Minimum number of tuples when we do R ⋈ S ( ⋈ = Natural Join)?

When we take natural join, the value of common attribute (B in this case) should match.

Max= 200 when all value of b in R (a,b,c) matches with value of b in S (b,d,e).

Min= 0 when none of values matches

Natural join is done on common atttibute... So in this case we have b as a common attribute.

For maximum when 200 tuples have same value for b

For minimum we get zero tuples when all the 500 tuples from both the tablea have different value for b.
edited by
maximum will be 60000 cz b is not the key . so value of v can  be same for all 300 records  and all 200 records.

When we take natural join, the value of common attribute (B in this case) should match.

Max= 200 when all value of b in R (a,b,c) matches with value of b in S (b,d,e).

Min= 0 when none of values matches

1 comment

Here, b is neither the prime attribute nor having the unique values.

Then max tuples will be when same value for attribute b span across both the relations i.e 300*200=60000

Min tuples is surely 0, when none of the values of b matches in the two relations.

the value of common attribute (B in this case) should match. but in relation their is no specification of key . so it may be the case that all b in R and S are different . and all values are the same and values may be indistinct bcz b is not key . so maximum will M*N   .

Max= 60000  when  all value of b in R (a,b,c) matches with all value of b in S (b,d,e).

Min= 0 when none of values matches

by

Yes u r right if they have not mention abut primary  key IN R :S   Then 600 tuple will be maximum

BUT if b is primary key in S then max will be 200

$S \Join_{<b=b>} R$

Then $minimum$ $number$ $of$ $tuples$ $=0$  $and$ $maximum$ $number$ $of$ $tuples$ $=300?$

please correct me if i'm wrong?
max tuple should be 300 and min 0 if all the attribute of b is same then 300 max as there is no condition mentioned
If b is fk in S referencing R then max tuples wolud be 300 in natural join as fk can contain duplicate values and min case is still same i.e 0