>I'd like to represent our organization's chain of command (i.e. who is
whose
>boss) in a database.
For some ideas see
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html
PB
David T. Ashley wrote:
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.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.9.1/854 - Release Date: 6/19/2007 1:12 PM