Responded to Q on join semantics

This commit is contained in:
Atri Rudra 2020-07-09 15:53:53 -04:00
parent 3a282bd4bf
commit 9c5e32f2ba

View file

@ -49,6 +49,7 @@ The evalution semantics notation $\llbracket \cdot \rrbracket = x$ simply mean t
\AH{I too had this question, and I \textit{think} the answer is that the join expression evaluation semantics are $\eval{R_1}(\tup[\sch(\rel_1)]) \times \eval{R_2}(\tup[\sch(\rel_2)])$ since it is possible that the output tuple $\tup$ may have a different schema than the original input tuples, and so we project away the dissimilar attributes because technically, if $\sch(\tup) \neq \sch(\rel_i)$, then $\rel_i(\tup)$ would be a diffirent polynomial than $\rel_i(\tup[\sch(\rel_i)])$.
{\bf Oliver}, please correct or add to this if necessary.}
\AR{oh, I see. OK, I think it is more accurate to write $\pi_{\sch(\rel_1)}(t)$ instead of $\tup[\sch(\rel_1)]$.}
Query operations are translated into one of the two semiring operators, with $\project$ and $\union$ of agreeing tuples being the equivalent of the '+' opertator in polynomial $\poly$, $\join$ translating into the $\times$ operator, and finally, $\select$ is better modeled as a function that returns either $\rel(\tup)$ or $0$ based on some predicate.