Closure Table

http://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree

http://dirtsimple.org/2010/11/simplest-way-to-do-tree-based-queries.html