CHAPTER 3 Path Enumeration Models
ONE OF THE properties of trees is that there is one (and only one) path from the root to every node in the tree. The path enumeration model stores that path as a string by concatenating either the edges or the keys of the nodes in the path. Searches are done with string functions and predicates on those path strings. For other references you should consult Advanced Transact-SQL for SQL Server 2000 (Chapter 16) by Itzik Ben-Gan and Tom Moreau, (APress, Berkeley, CA; 2000; ISBN 1–893115–82–8). With this book they made the path enumeration model popular. The code in this book is product-specific, but easily generalized.
There are two methods for enumerating the paths: edge enumeration and node enumeration. The ...
Get Joe Celko's Trees and Hierarchies in SQL for Smarties now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.