GATE CS 2026 · Set-1 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0046

Consider a relational database schema with two relations \(R(P, Q)\) and \(S(X, Y)\). Let \(E=\{\langle u\rangle \mid \exists v \exists w\langle u, v\rangle \in R \wedge\langle v, w\rangle \in S\}\) be a tuple relational calculus expression. Which one of the following relational algebraic expressions is equivalent to \(E\) ?
  1. A
    \(\Pi_{P}\left(R \bowtie_{R . P=S . X} S\right)\)
  2. B
    \(\Pi_{P}\left(S \bowtie_{S . X=R . Q} R\right)\)
  3. C
    \(\Pi_{P}\left(R \bowtie_{R . P=S . Y} S\right)\)
  4. D
    \(\Pi_{P}\left(S \bowtie_{S . Y=R . Q} R\right)\)

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

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/523047/gate-cse-2026-set-1-question-33

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