Hubert,
> i recently spent some time on tree-structures in sql.
> i started with simple id/parent_id approach, used by nearly everyone,
> then i stopped at joe celko's nested sets, but i found it not very
> usable.
I'll be posting an article on implementing nested set trees "real soon now".
My experieince:
Adjacency list trees are easier to understand conceptually, there are more
tools on freshmeat.net for them, and they are the most efficient form of tree
for graphical display.
Nested Set trees are hard to wrap your mind around, lack a lot in the way of
code samples on freshmeat, are harder to build GUI tools for, but are much,
much faster for determining branch membership and branch parenthood.
So which model you use depends on what you intend to do with the tree.
--
-Josh Berkus
Aglio Database Solutions
San Francisco