Given two relations $R(A, B)$ and $S(A, C)$.

I can understand the early part is the projection of attribute $A$ from $S$, which could be written as $π_a(S)$, but later part is confusing and not understandable to me.

$$ \{a| (\exists c) (S(ac)) \land (\exists b_1) (\exists b_2) ( R(ab_1) \land R(cb_2) \land b_1 > b_2 ) \}$$

Can anyone help me understand it? and how to convert this domain relational calculus to its relational algebra?

  • $\begingroup$ Your intuition on projection is correct. An expression alike {bc | (∃ a) R(ab) ∧ S(ac)} is basically a join on attribute A between R and S. Conjunction are typically captured by selection or intersection. As an hint, you can try to parse the expression, then to say it loud in English, and finally to translate the English sentence into a relational expression $\endgroup$ – Romuald Sep 11 '14 at 12:57
  • $\begingroup$ For R.a = S.c, when R.b is bigger(or the maximum?), print S.a? $\endgroup$ – canoe Sep 11 '14 at 14:27

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.