Some interesting variations can be asked in such question. I have discussed some of them below.
To ensure entity integrity, it is required that every table have a primary key(PK). Neither the PK nor any part of it can contain null values.
Note that “rollno” in Student relation is primary key, So, it cannot contain Null values. Similarly, “rollno” and “courseno” in Enroll table cannot contain Null values.
The number of tuples in the student and Enroll tables are 120 and 8 respectively.
Some Variations we can try in this question :
Case 1 :
If there was a referential constraint in place ensuring that every rollno in Enroll must also appear in Student (i.e. “rollno” of relation Enroll is assumed to be a foreign key referencing to the relation “Students”) :
1.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural join?
Answer : Maximum = 8 ; Minimum = 8
2.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes Cartessian Product (aka Cross product or cross join) ?
Answer : Maximum = $120 \times 8$ ; Minimum = $120 \times 8$
3.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural left outer join join?
Answer : Maximum = 127 ; Minimum = 120
4.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural right outer join join?
Answer : Maximum = 8 ; Minimum = 8
5.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural full outer join join?
Answer : Maximum = 127 ; Minimum = 120
Case 2 :
The question doesn't actually mention any referential constraint constraint So there's no need to assume that the referential integrity constraint exists just because the rollno attribute appears in both tables. So,
If there is NO referential constraint in place ensuring that every rollno in Enroll must also appear in Student (i.e. “rollno” of relation Enroll is NOT a foreign key referencing to the relation “Students”) :
1.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural join?
Answer : Maximum = 8 ; Minimum = 0
2.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes Cartessian Product (aka Cross product or cross join) ?
Answer : Maximum = $120 \times 8$ ; Minimum = $120 \times 8$
3.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural left outer join join?
Answer : Maximum = 127 ; Minimum = 120
4.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural right outer join join?
Answer : Maximum = 8 ; Minimum = 8
5.
What are the maximum and minimum number of tuples that can be present in (Student $*$ Enroll), where $’*’$ denotes natural full outer join join?
Answer : Maximum = 128 ; Minimum = 120