Given the schema R(P,Q) and S(X,Y):
In the tuple relational calculus (TRC) expression:
E={⟨u⟩∣∃v∃w(⟨u,v⟩∈R∧⟨v,w⟩∈S)} A tuple ⟨u,v⟩∈R assigns u to attribute P and v to attribute Q.
A tuple ⟨v,w⟩∈S assigns v to attribute X and w to attribute Y.
The shared variable v represents the equality condition between the second attribute of R (Q) and the first attribute of S (X):
The target tuple is ⟨u⟩, which corresponds to attribute P of relation R.
Translating this into relational algebra gives:
ΠP(S⋈S.X=R.QR)orΠP(R⋈R.Q=S.XS)
Hence, option (B) is the correct equivalent relational algebraic expression.