in Databases
1,263 views
3 votes
3 votes

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)?

in Databases
by
1.3k views

4 Comments

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

0
0
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.
0
0
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.
1
1

2 Answers

3 votes
3 votes
Best answer

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

selected by

1 comment

@  iarnav

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. 

5
5
7 votes
7 votes

  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

edited by

4 Comments

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

0
0
If they ask

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

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

please correct me if i'm wrong?
0
0
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
0
0
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
0
0

Related questions

2 votes
2 votes
1 answer
2