Nested set model: Difference between revisions

Content deleted Content added
m sortable !
Line 25:
[[File:Clothing-hierarchy-traversal-2.svg|thumb|400px|The numbering assigned by tree traversal]]
<!-- I know the leaves are out of order, but I can't fix it due to a bug in my version of dot :-( -->
{| class="wikitable sortable"
|! Node || Left || Right
|-
| Clothing || 1 || 22
Line 120:
The query will be more complicated when searching for children more than one level deep. To overcome this limitation and simplify [[tree traversal]] an additional column is added to the model to maintain the depth of a node within a tree.
 
{| class="wikitable sortable"
|! Node || Left || Right || Depth
|-
| Clothing || 1 || 22 || 0