in Databases
992 views
1 vote
1 vote

My answer is not matching with any of the option.so what is the correct answer 

in Databases
992 views

8 Comments

edited by
0 and 120 I guess.
1
1
A is the primary key in R and C is the primary key in S.

C is common in both. So the natural join between R and S should be based on this column C. So C in A should act as the foreign key.

In natural join, min and max no. of tuples in R natural join S should be equal to the no. of tuples in child table.

Here child table is R. So (120,120) should be the answer. No option is matching :(
2
2
you are saying all foreign key column can be null in relation R?

It's possible but all example take I've seen take min value (here 8).
0
0
0
0
why are you assuming foreign key constraint if not given.

simply min =0 , max =120
4
4
@Panda except the first tuple in the box other would not be there in resulting table ! answer should be $0,120$
0
0
What will be the values ?

No common attribute, max : 120*8  min = 120*8 (Cartesian Product)

Common attribute (But no foreign key constraint) : max : 120  min : 0 

Common attribute (Foreign key constraint given) : max : ? min : ?
0
0

joshi_nitish Ok you are right. If there is no mention of referential integrity we should not assume it already.

1
1

1 Answer

2 votes
2 votes
Best answer

min=0 will occur when there is some common attribute, but that common attribute does not contain any value which is common in both tables.

for the maximum let all the values of C in R is same means 120 values are same so from R to S there will 120 tuples matches(for any single tuple of S as in R all values of C are same)

min =0 , max =120

1 comment

 min = 0 and max = 120 x 8 => 960 

maximum number of tuple in natural join is M x N 

proof – https://stackoverflow.com/questions/30145583/what-is-maximum-number-of-tuples-in-natural-join/30145769

0
0

Related questions