[prev] 38 [next]

Mapping SQL to Relational Algebra (cont)

The join operations could be done in two different ways:

[Diagram:Pics/qproc/join-trees.png]

Note: for a join on n tables, there are potentially O(n!) possible trees

The query optimiser aims to find version with lowest total cost.