SQL Server MVP Deep Dives, Volume 2
by Brad McGehee, Louis Davidson, Greg Low, Kimberly Tripp, Paul S. Randal, Kalen Delaney, Paul Nielsen
Chapter 29. Effective use of HierarchyId
Denis Reznik
We find hierarchies in many places in our lives, such as organizational structures, sporting events, product categories in an e-market, social relationships, algorithms, classifications, and elsewhere. Modeling such systems means creating and storing information about the objects in a system. Tons of code was written using object-oriented programming principles, and many variants of storing information about objects in a database were invented. Hierarchy is a type of relationship between objects, and that’s why modeling hierarchies is a common operation in writing code and databases.
Hierarchies in a database
There are many types of hierarchy implementations in a database. Parent-child ...
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