[prev] 39 [next]

Mapping Rules

Mapping from SQL → RA expression requires:
  • a collection of templates, 1 for each kind of query
  • a process to match an SQL statement to a template
  • mapping rules for translating matched query into RA
May need to apply >1 templates to map whole SQL statement.

After mapping, apply rewriting rules to "improve" RA expression

  • convert to equivalent, simpler, more efficient expression

Note: PostgreSQL also has user-defined mapping rules (CREATE RULE)