GATE Papers >> CSE >> 2017 >> Question No 46

Question No. 46 CSE | GATE 2017

Consider a database that has the relation schema CR (StudentName, CourseName).An instance of the schema CR is as given below.

CR
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

The following query is made on the database.

$\style{font-family:'Times New Roman'}{\begin{array}{l}T1\leftarrow{\mathrm\pi}_{CourseName}\;({\mathrm\sigma}_{StudentName\mathit=\mathit'SA\mathit'}(\mathrm{CR}))\\T2\leftarrow CR\;\div T1\end{array}}$

The number of rows in T2 is__________


Answer : 4.0 to 4.0


Solution of Question No 46 of GATE 2017 CSE Paper

T1 result:  

Course Name
CA
CB
CC

$T_2$ result : $ \mathrm{CR}\div T_1\mathit\Rightarrow $ student name for which every course name of CA, CB, CC is

SA
SC
SD
SF
 
4 tuples in result
Comments
No Comments
Leave a comment