0
$\begingroup$

I have an expression in DRC $\{\langle a,b,c \rangle \mid \langle a,b \rangle \in r \land \langle a,b \rangle \in s\}$, where $r = (A,B)$ and $s = (A,C)$. I want to convert it onto relational algebra and got this: $π_{A,B,C}(σ_{r.A = s.A \land r.B = s.C}(rxs))$ and I am not sure if it is correct...

Can someone explain if it is correct? Why it is correct or why it is not?

$\endgroup$
  • $\begingroup$ We don't usually check answers to exercises, unless you have a specific doubt (beyond not being sure whether the solution is correct). $\endgroup$ – Yuval Filmus Dec 3 '17 at 7:35
  • $\begingroup$ Your DRC formula looks wrong to me. Shouldn't the r.h. side of the conjunction be <a, c> ∈ s? Your RA is almost certainly wrong. Read about Natural Join en.m.wikipedia.org/wiki/… $\endgroup$ – AntC Dec 3 '17 at 22:18

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.