|
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]
|