List:General Discussion« Previous MessageNext Message »
From:David T. Ashley Date:June 19 2007 5:15pm
Subject:Best Database Representation of a Chain of Command
View as plain text  
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.

Thread
Best Database Representation of a Chain of CommandDavid T. Ashley19 Jun
  • Re: Best Database Representation of a Chain of CommandPeter Brawley19 Jun