I'm implementing a organizational chart in SQL Server 2016 as a hierarchical structure. I have to do read, insert, update on the tree. I also have to get the subtree faster.
I looked at few different ways to implement this. The first and foremost, I thought about hierarchyid. Then I came across a couple of different ways that Joe Celko mentioned in his book SQL Anti-Patterns
I also see another method mentioned at http://www.sqlservercentral.com/articles/Hierarchy/94040/.
My questions are:
- Doesn't hierarchyid do what a closure table does?
- Does using hierarchyid make query slower?