You are here: Re: One-One Relationship « MsSQL Server « IT news, forums, messages
Re: One-One Relationship

Posted by Bernard Peek on 10/12/05 20:24

In message <1129059721.577099.222460@g49g2000cwa.googlegroups.com>,
dbahooker@hotmail.com writes
>set of keys?
>
>a primary key should always be a single column
>
>always always always

Nope. It is what it is. If the object you are modelling requires three
attributes to uniquely identify it then your primary key is made up of
three columns. Database designers don't get to decide what their primary
key is, the data decides and you live with whatever it hands you.

I think what you are thinking of is the practise of adding a surrogate
key to a table that has an inconvenient primary key. Some people always
do that when they face a multi-column key. Personally I avoid surrogate
keys if I can.


--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.

 

Navigation:

[Reply to this 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

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