in Databases
1,130 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?
in Databases
by
1.1k views

4 Comments

max 1200 will be correct, if we do not assume any primary keys.

Look, we will get 1200 (=30*40), when every tuple of student will match with every tuple of enroll. That will be the case when roll number in student and roll no in enroll has the same value in every tuple. Try to verify it yourself.
0
0
max 1200 is correct but how min 40

what if not even single entry matches?
0
0
@Utkarsh Read my first comment(3rd from top).

Min will be 0.

But in case it was given in the question that roll no in enroll is a foreign key referencing to roll no of student, then Min: 40

For this question, where nothing is given, 0 is correct.

I was just telling the answer in case such constraints are given :)
1
1

Please log in or register to answer this question.

Related questions

2 votes
2 votes
1 answer
2