Gijs Van Tulder wrote a recent article on Storing Hierarchical Data in a Database. (see my older database tree links.

I actually use a different method than either the simple adjacency list or the modified preordered tree traversal algorithms – basically I used thread id’s in my query, reading in batches of nodes by thread and then used a simple depth-first traversal (recursive) function to put each thread together. I need to try out some different algorithms and test out the performance differences and flexibility.