Reply to Re: AutoNumber vs. Key

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация