JimFoye wrote:
Why wouldn't you just make manager ID a foreign key in your employees (or persons) table? Each employee only has one manager, right? Not sure why you have a separate table here with its own PK.
Ahhh, yeah. I was trying to come up with a simple example but the one I gave doesn't really explain the situation fully. Here's the real case...We are tracking contracts in a hierarchical table. Any particular row in the table represents just one level of the contract...so for example, one row might represent an order contract, while its children represent Base Year 1, Option Year 1, Option Year 2, etc...Rolling up to the "order" level represents the entire order. The order can not be accurately represented as just that one row in the table, it only has context when its child rows are attached.
I can see calling any one entity with its children a "Contract" but I cannot see calling the table Contract, because each row does not in itself represent a contract....any ideas?