It is a somewhat dated article as you can see from the examples with the old MySQL extension, but it can still apply: Sitepoint: Storing Hierarchical Data in a Database.