Aug 272008
The goal is to be able to maintain an arbitrarily deep hierarchy of some kind of data that you can navigate efficiently. Please see Managing Hierarchical Data in MySQL for a good description of the theory behind this.
I’ve posted an example implementation here.