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 ?
- (A)
- (B)
- (C)
- (D)
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 ?
ANSWER
The expression E equals , which is option (B).
Official answer: BSource: Official answer key, GATE 2026 CS1 (IIT Guwahati)
Read the calculus expression. The answer tuple is , so the output has one column. Because and has attributes , is the value of and is the value of .
The condition with means is the value of and is the value of .
The variable appears in both tuples. A tuple of and a tuple of must therefore agree with .
The variable is only existentially quantified. It is not in the output, so is not used and simply drops out. The same holds for , which is quantified and not output.
So . A theta join is symmetric in its operands, so .
Check the options. (A) joins on and (C) on . Both use , the wrong attribute of . (D) joins , which uses , the wrong attribute of . Only (B) joins and projects .
KEY IDEA
A variable shared by two tuples in a calculus expression becomes an equality join condition. Existentially quantified variables that are not output are projected away.
WATCH OUT FOR
Joining on the first attribute of each relation ( with ), or on the second attribute of (). The shared variable is the second position of the tuple (attribute ) and the first position of the tuple (attribute ).
From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 13 Relational algebra questions, with notes