1,523 views
0 votes
0 votes
Consider the relation schema:

Student(roll no, name course no)

Enroll(roll no, course no,course name)

The number of tuples in the student and enroll table is 30 and 40 respectively

The natural join is performed on roll no., what is max. and min. no. of tuples that are possible?

1 Answer

0 votes
0 votes

If RI and PK are not provided, then min = 0 (No tuples is common) and max = 1200 (if all tuples are same) [This seems correct according to the question]

If enroll’s roll no is a FK referencing to student’s roll no and roll no is not a PK in any of the table, then min = 40 and max = 1200.

If enroll’s roll no is a FK referencing to student’s roll no and student’s roll no is a PK, then min = 40 and max = 40.

If enroll’s roll no is a FK referencing to student’s roll no and roll no is PK in both the table, then min = 30 and max = 30

If No FK is provided and roll no is PK in both the table, then min = 0 (No tuple is common) and max = 30.

PS : Source – maximum and minimum number of tuples in natural join 

Related questions

3 votes
3 votes
2 answers
1
iarnav asked Dec 6, 2017
1,258 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 Joi...
2 votes
2 votes
1 answer
2
4 votes
4 votes
4 answers
3
kauray asked May 9, 2017
3,687 views
Suppose you are given relations r(A, B) and s(A, C). Suppose that r has 10000 tuples, and s has 5000 tuples. Suppose attribute r.A has 1001 distinct values, and s.A also ...