Consider two relational R(P, Q) and S(X, Y). Given E = {u — ∃ v ∃ w such that (u, v) ∈ R and (v, w) ∈ S} Which one of the following relational Algebra expressions is equivalent to E?
Correct Answer :
πp(S ▷◁S.X=R.Q R)
Solution :
The correct option is:
πP(S ▷◁S.X = R.Q R)
Let us analyze the given tuple relational calculus (TRC) expression:
Here, the relation has attributes , and the relation has attributes .
From , we see that corresponds to the first attribute of (which is ) and corresponds to the second attribute of (which is ).
From , we see that corresponds to the first attribute of (which is ) and corresponds to the second attribute of (which is ).
The variable acts as the linking variable between and , which means the value of the attribute in must be equal to the value of the attribute in ().
This constraint represents a join operation between relations and on the condition .
The set consists of the values of , which is the attribute of . Therefore, we project attribute from the joined relation.
Putting it all together:
1. Perform the join:
2. Project attribute :
This matches the correct relational algebra expression:
πP(S ▷◁S.X = R.Q R)
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.