|
Posted by Trevor Best on 10/14/05 10:31
Tom wrote:
> Hi,
>
> Is there a reason for using one and only one column as the key?
> I find it hard to enforce the integrity of the database with this design.
>
> for example,
> let's say the [company]-[employee]-[sale] tables.
> company A has an employee B.
> employee B makes a sale C.
>
> If employee B moves to another company, the sale C in the [sale] table will
> move along with employee B to the new company.
> This doesn't look correct to me.
As a programmer, if you work for a company you already know that code
you write at such company belongs to the company, not to you. Why would
the sale in your example belong to the salesman and not the company in
the first place. The sale would be a sub record of the company, the
salesman is just an attribute.
Navigation:
[Reply to this message]
|