-
Consider a database that has the relation schema CR(StudentName. CourseName). An instance of the schema CR is as given below.
The following query is made on the database.
T1 ← πCourseName (σStudentName= ‘SA’(CR))
T2 ← CR ÷ T1
The number of rows in T2 is _______.
-
- 1
- 2
- 4
- 15
Correct Option: C
The given query is made on the database are:
1.
For T1 Result: find out the course name for the student name is ‘SA’ i.e.
So, T1 = {CA, CB, CC} The number of rows in T1 is 3.
2. T1 ← (CR ÷ T1)
For T2 Result: find out the student name for which every course name of T1 are {CA, CB, CC} is:
So, T2 = {SA, SC, SD, SF} Hence, the number of rows in T2 is 4.