How to Implement a Hierarchy in SQL Server

Louis Davidson
60 minutes
Application & Database Development
One of the most common structures you will come across in the real world is a hierarchy (either a single parent "tree" or a multi-parent "graph"). Many systems will implement the obvious examples, such as a corporate managerial structure or a bill of materials. It turns out that almost any many-to-many relationship can be used as a hierarchy to find the relationship of parent rows to child rows (for example, the relationship of actors to movies they’ve been in). In this session, we’ll discuss several different implementations of hierarchies that you can use to optimize your hierarchy implementations, including SQL Server 2017's graph tables, and put into practice immediately, with ready-made T-SQL examples.

Accompanying Material

No material found.

Back to Top cage-aids