There are two well known ways to deal with searching in multiple level
hierarchies without having to traverse all the links.
1) Interval method: using a low - high interval on each node such that
all childrens' intervals are subsets of the parent's interval.
2) Tree-code annotation: as a tree-code attribute (e.g., "1.2.3.4.5")
such that you can find all children of "1.2.3" using the predicate
treeCode LIKE "1.2.3.%". |