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 ______.

StudentNameCourseName
SACA
SACB
SACC
SBCB
SBCC
SCCA
SCCB
SCCC
SDCA
SDCB
SDCC
SDCD
SECD
SECA
SECB
SFCA
SFCB
SFCC
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