Jeff Moden (9/15/2014)
fregatepllada (9/14/2014)
Larry - are you aware that since SQL Server 2008 R2 there is a data type HierarchyID?If you using anything older than that version there is a Joe Celco book 100% dedicated to the
topic of hierarchies, trees and graphs 😉
I'm curious... are you using the HierarchyID datatype for anything now?
No - just in cases when number of levels is UNKNOWN in design time!
I got your irony - let's just for FUN implement a WHOLE db in a single table:
- Identifier (Sequential GUID - PK and replication ID in the same column);
- xml to store ANY entity (could be even strongly typed by XSD collection);
- HierarchyID to set ALL relationships;
This is much cooler than EAV anti-pattern: a minimalistic Zen approach to database design!