Code

Changes between Version 11 and Version 12 of ModifiedPreorderTreeTraversal


Ignore:
Timestamp:
07/20/07 03:39:07 (7 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModifiedPreorderTreeTraversal

    v11 v12  
    22[http://groups.google.com/group/django-users/browse_frm/thread/ad54ef8b858c2d33] 
    33 
    4 There's a good article explaining [http://www.sitepoint.com/print/hierarchical-data-database what's Modified Preorder Tree Traversal on SitePoint]. I am not going to explain the whole theory here, just offer some code so you can implement it quickly. 
     4There's a good article explaining [http://www.sitepoint.com/print/hierarchical-data-database what's Modified Preorder Tree Traversal on SitePoint] (aka Nested Set). I am not going to explain the whole theory here, just offer some code so you can implement it quickly. 
    55 
    66Basically, it allows you to discover every children, or parents, or the whole tree, with a single query. Very efficient! And good for threaded discussions...