I need to model an Agent structure where an Agent reports to a superior who can report to a superior and so on ad infinitum.
I have recently discovered the HierarchyID type in SQL Server and would like to know how exactly I need to create the table.
I have an AgentPK field of type uniqueidentifier. Now I need the Hierarchy, do I just create a field like HieararchyPath type HierarchyID? I get the impression from what I have found on-line that the hierarchyid field holds the path of all superiors' primary keys, so is a uniqueidentifier appropriate to use as the table's Primary Key? Or does it not matter?
Is using the hierarchyid the best way to do this, or do I go with the old ReportsTo field where I store the superior's Primary Key in this field?