GATE CS 2008 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0116

Let R and S be two relations with the following schemaR (\(\underline{P},\underline{Q}\),R1,R2,R3)S (\(\underline{P},\underline{Q}\),S1,S2)Where {P, Q} is the key for both schemas. Which of the following queries are equivalent?I. \(\Pi _{P}(R\Join S)\) II. \(\Pi _{p}(R)\Join \Pi _{P}(S)\) III. \(\Pi _{P}(\Pi _{P,Q}(R)\cap \Pi _{P,Q}(S))\) IV. \(\Pi _{P}(\Pi _{P,Q}(R)-(\Pi _{P,Q}(R)-\Pi _{P,Q}(S)))\)
  1. A
    Only I and II
  2. B
    Only I and III
  3. C
    Only I, II and III
  4. D
    Only I, III and IV

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

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/491/gate2008-68

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