GATEverse
← GATE CSE 2019

Q55

NAT2 marks

Consider the following relations P(X,Y,Z),Q(X,Y,T)P(X,Y,Z), Q(X,Y,T) and R(Y,V)R(Y,V).

XYZX1Y1Z1X1Y1Z2X2Y2Z2X2Y4Z4Table: PXYTX2Y12X1Y25X1Y16X3Y31Table: QYVY1V1Y3V2Y2V3Y2V2Table: R\overset{\textbf{Table: P}}{\begin{array}{|l|l|l|} \hline \textbf{X} & \textbf{Y} & \textbf{Z} \\\hline \text{X1} & \text{Y1} & \text{Z1} \\\hline \text{X1} & \text{Y1} & \text{Z2} \\\hline \text{X2} & \text{Y2} & \text{Z2} \\\hline \text{X2} & \text{Y4} & \text{Z4} \\\hline \end{array}} \qquad \overset{\textbf{Table: Q}}{\begin{array}{|l|l|l|} \hline \textbf{X} & \textbf{Y} & \textbf{T} \\\hline \text{X2} & \text{Y1} & 2 \\\hline \text{X1} & \text{Y2} & 5 \\\hline \text{X1} & \text{Y1} & 6 \\\hline \text{X3} & \text{Y3} & 1 \\\hline \end{array}} \qquad \overset{\textbf{Table: R}}{\begin{array}{|l|l|} \hline \textbf{Y} & \textbf{V} \\\hline \text{Y1} & \text{V1} \\\hline \text{Y3} & \text{V2} \\\hline \text{Y2} & \text{V3} \\\hline \text{Y2} & \text{V2} \\\hline \end{array}}

How many tuples will be returned by the following relational algebra query? Πx(σ(P.Y=R.Y∧R.V=V2))(P×R))–Πx(σ(Q.Y=R.Y∧Q.T>2))(Q×R))\Pi_x (\sigma_{(P.Y=R.Y \wedge R.V=V2))} (P \times R)) – \Pi_x (\sigma_{(Q.Y = R.Y \wedge Q.T>2))} (Q \times R)) Answer: ________

Sign in to save attempts.

Loading…