CHAPTER 8 Other Models for Trees

THE MODELS FOR trees and hierarchies discussed so far are not the only ones. There are other models that use different approaches and properties of trees, some of which are hybrids of other models.

8.1 Adjacency List with Self-references

A slight modification of the usual adjacency list model is to include an edge that loops back to the same node.

image

Personnel_OrgChart

image

image

This makes the table longer, but it avoids a ...

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.