Gate2019 cs Q65

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

P Q R
XYZ XYT YV
X1Y1Z1 X2Y12 Y1V1
X1Y1Z2 X1Y25 Y3V2
X2Y2Z2 X1Y16 Y2V3
X2Y4Z4 X3Y31 Y2V2
How many tuples will be returned by the following relational algebra query?
πx(P.Y = R.Y ∧ R.V = V2)(P X R)) - πx(Q.Y = R.Y ∧ Q.T > 2(Q X R))

Note – Numerical Type question

  • Option : B
  • Explanation :
    Gate2019 cs
    πx(P.Y = R.Y ∧ R.V = V2)(P X R)) ⇒
    X
    X2
    .........(I)
    Gate2019 cs
    Πx(Q.Y = R.Y ∧ Q.T > 2) (Q × R)) ⇒
    X
    X1
    .........(II)
    I – II ⇒
    X
    X2
    one record in result.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *