I'd like to represent our organization's chain of command (i.e. who is whose boss) in a database.
The reason is that in some contexts, my database application needs to know who can view whose time and project records (and the rule is that anyone above in the chain of command can, anyone at the same level or below cannot). Conceptually, this is of course a tree. What is the best representation? My notion would be just a single table with a collection of "boss-subordinate" records. To find person X's boss, query by where X appears as the subordinate. To find person X's first-level subordinates, query by where X appears as boss. Is there a better way to represent a tree? Thanks, Dave.