Question

Consider a relational database schema with two relations R(P,Q)R(P, Q) and S(X,Y)S(X, Y).

Let E={⟨u⟩∣∃v ∃w ⟨u,v⟩∈R∧⟨v,w⟩∈S}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 EE ?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2026 answer key

Solution

Match the positions of variables u,v,wu, v, w in ⟨u,v⟩∈R(P,Q)\langle u, v \rangle \in R(P, Q) and ⟨v,w⟩∈S(X,Y)\langle v, w \rangle \in S(X, Y) with their respective attribute names.

In the tuple relational calculus expression E={⟨u⟩∣∃v ∃w ⟨u,v⟩∈R∧⟨v,w⟩∈S}E = \{\langle u \rangle \mid \exists v \, \exists w \, \langle u, v \rangle \in R \wedge \langle v, w \rangle \in S\}:

  • ⟨u,v⟩∈R(P,Q)\langle u, v \rangle \in R(P, Q) binds u=R.Pu = R.P and v=R.Qv = R.Q.
  • ⟨v,w⟩∈S(X,Y)\langle v, w \rangle \in S(X, Y) binds v=S.Xv = S.X and w=S.Yw = S.Y.
  • The shared variable vv enforces the join condition S.X=R.QS.X = R.Q, and the output tuple ⟨u⟩\langle u \rangle projects attribute PP (R.PR.P).

Thus EE is equivalent to ΠP(S⋈S.X=R.QR)\Pi_P(S \bowtie_{S.X = R.Q} R).

Final answer

Option (B)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
Question
43 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.