Chapter 6. Linear Version of the Nested Sets Model
If you look at the diagram that shows the left and right numbers on a number line, you will realize that this diagram can be used directly to represent a tree in a nested sets model. The (lft, rgt) numbers each appear once, but the nodes of the tree appear exactly twice—once with the lft number and once with their rgt number.
Keywords: insertion, deletion, paths, levels
If you look at the diagram that shows the left and right numbers on a number line, you will realize that this diagram can be used directly to represent a tree in a nested sets model. The (lft, rgt) numbers each appear once, but the nodes of the tree appear exactly twice—once with the lft number and once with their rgt number. The ...

Get Joe Celko's Trees and Hierarchies in SQL for Smarties, 2nd Edition 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.