Note: This article has moved, here: http://devjitsu.com/blog/2010/04/22/hierarchical-data-trees-with-a-database/