GATE CS 2009 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0113

Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider the following queries on the database: \(I.\pi _{R-S}(r)-\pi_{R-S}(\pi_{R-S}(r) \times S -\pi_{R-S,S}(r))\) \(II.\{t|t\in \pi _{R-S}(r)\wedge \forall u \in s (\exists v \in r(u=v[s]\wedge t=v[R-S]))\}\) \(III.\{t|t\in \pi _{R-S}(r)\wedge \forall v\in r(\exists u\in s(u=v[s]\wedge t=v[R-S]))\}\) IV. Select R.a, R.b From R,S Where R.c=S.cWhich of the above queries are equivalent?
  1. A
    I and II
  2. B
    I and III
  3. C
    II and IV
  4. D
    III and IV

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/1331/gate2009-45

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com