This content has been marked as final.
Show 2 replies
-
1. Re: Construct a tree
Owain North May 2, 2011 11:19 PM (in response to hidarikani)Absolutely. Take a look at the cftree tag.
-
2. Re: Construct a tree
Adam Cameron. May 3, 2011 12:46 AM (in response to hidarikani)Of course it's possible.
However I'd not implement my tree using the "adjacency list model" (where you have nodes which have a reference to their parent nodes), as it's a pretty poor performer for anything other than basic "who's my immediate parent" and "who are my immediate children" operations.
If you need to do ancestor / descendant look-ups, and you're reading more often than you're writing (which is almost always the case with web sites/applications), then you ought to look at the "nested set model" instead.
--
Adam


