Consider a relational database schema with two relations and .
Let be a tuple relational calculus expression.
Which one of the following relational algebraic expressions is equivalent to ?
View worked solution
Answer: B
To find the relational algebra expression equivalent to the given Tuple Relational Calculus (TRC) expression, let us analyze its components step-by-step.
1. Analyze the Relation Schemas
- Relation has attributes (first position) and (second position).
- Relation has attributes (first position) and (second position).
2. Deconstruct the TRC Expression
The given TRC expression is:
- First term:
Since has attributes , this implies: - Second term:
Since has attributes , this implies:
3. Establish the Equivalence
Since the variable represents both and , we must equate them:
The output tuple contains only , which corresponds to the attribute of relation . Therefore, we project only after performing a theta-join between and on the condition :
This matches Option B.
Free practice · Your answers on this page are not saved.
