0
$\begingroup$

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??

Thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ If $x=y$ then $y=x$. The two expressions are equivalent. $\endgroup$ – Derek Elkins Aug 29 '18 at 6:54
  • $\begingroup$ Hey Derek, thanks for the comment. But I couldnt get your point. Can you please elaborate a bit? Thank you $\endgroup$ – Abhilash Mishra Aug 30 '18 at 15:42
  • $\begingroup$ 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. $\endgroup$ – AntC Sep 7 '18 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.