12 Hierarchies
If you think education is expensive, try ignorance.—Derek Bok, former president of Harvard.
A hierarchy is special kind of data structure made up of nodes connected to one another via oneway relationships known as edges. These nodes exist at multiple levels and roughly resemble a tree—in fact, you’ll often hear the terms “hierarchy” and “tree” used interchangeably. Out of the box, Transact-SQL provides only meager support for hierarchies and trees. Other products such as Oracle have decent tree support, but Transact-SQL is strangely lacking here. This isn’t the limitation that it might seem, though, because there are a number of straightforward techniques that make displaying and manipulating hierarchies fairly simple in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access