Monoid Algebra
?p (R) = ?{ r | r ? R, p(r) }
R ><p S = ?{ (r,s) | r ? R, s ? S, p(r,s) }
?p?/e(R) = ?{ e(r) | r ? R, p(r) }
?ppath(R) = ?{ (r,s) | r ? R, s ? path(r), p(r,s) }
?p?/e/f(R) = ?{ ( f(r), ?{ e(s) | s ? R, f(r)=f(s), p(s) } )
Notes:
Here are the algebraic operators and their meaning in terms of the monoid calculus. All operators are higher-order, that is, they are parameterized by functions, which makes them very generic. Since we are translating the calculus into the algebra, this means that calculus and algebra are equivalent. In fact if we do not do any query unnesting, the 5 first operators are sufficient for the translation.