# Relational calculus expression for projection (Database Management)

## I recently came across this question:

Let the following relation schemas be given:

$R=(A,B,C)$

$S=(D,E,F)$

Let relations r(R) and s(S) be given. Give an expression in the tuple relational calculus that is equivalent to the following:

## a. $\pi_A(r)$

The solution provided is:

## $\{t|\exists q \in r(q[A]=t[A]) \}$

But according to me, the solution should have been:

$\{t|\exists q \in r(t[A]=q[A]) \}$

Can anyone please help me in fiding out where my error is, or whether I am correct??

• If $x=y$ then $y=x$. The two expressions are equivalent. – Derek Elkins left SE Aug 29 '18 at 6:54
• Derek's pointing out that the only difference between the provided solution compared to your solution is the order of operands to =. If you think that order of operands in TRC is significant, please give a reference. – AntC Sep 7 '18 at 11:51