[prev] 40 [next]

Mapping Rules (cont)

Projection:

SELECT   a+b AS x, c AS y   FROM   R ...

⇒    Proj[x←a+b, y←c](R)

SQL projection extends RA projection with renaming and assignment

Join:

SELECT ... FROM ... R, S ... WHERE ... R.f  op  S.g ... ,    or

SELECT ... FROM ... R JOIN S ON  (R.f op S.g) ... WHERE ...

⇒    Join[R.f op S.g ](R,S)