First page Back Continue Last page Graphics
Translating algebra to tupel calculus
- Selection: let { t | f(t) } be a tc expression equivalent to E then E1= AB(E) or E1= Ac(E) (where is , , ,...) is translated to { t | f(t) t[A]t[B] } resp. { t | f(t) t[A]c }
- Projection: if E translates to { t | f(t) } then B1, ...,Bp (E) translates to { t | f'(t) } where f' is f with references to t[B1] ... t[Bp] only (no other attributes of t used in f).
- Cartesian Product: if E1 (over A1, ...,An) translates to { t | f(t) } and E2 over B1, ...,Bm translates to { s | g(s) } then E1 E2 translates to { r | f(t) g(s) t[A1]=r[A1] ... t[An]=r[An] s[B1]=r[B1] ... s[Bm]=r[Bm] }
Notes: