GATE CS 2017, set 1 · Question 46 · Databases · Numerical answer (NAT) · 2 marks · no negative marks
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below.
CR
The following query is made on the database.
T1 ← π_(CourseName)(σ_(StudentName='SA')(CR))T2 ← CR ÷ T1
The number of rows in T2 is ______.
| StudentName | CourseName |
|---|---|
| SA | CA |
| SA | CB |
| SA | CC |
| SB | CB |
| SB | CC |
| SC | CA |
| SC | CB |
| SC | CC |
| SD | CA |
| SD | CB |
| SD | CC |
| SD | CD |
| SE | CD |
| SE | CA |
| SE | CB |
| SF | CA |
| SF | CB |
| SF | CC |
Answer
Answer 4
Answer from the official GATE CS 2017 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes