On Tue, Mar 16, 2010 at 10:06 AM, Aaron Cooper <[email protected]> wrote:

> An example of what has caused my concern here is a table called "Devices"
> which will store information on individual physical electronic devices. He
> has made the primary keys DeviceID, CustomerID, CountryID and DeviceTypeID.
>
> This seems to be a massive overkill even in my limited DB design experience.
> Each device will appear only once in this table, so why is the DeviceID not
> good enough alone?

For the primary key I agree with you, a unique identifier for the
device should suffice (note I'm not addressing the natural vs surrogae
issue).

The customerID, countryID and DeviceTypeID, these are presumably
foriegn keys held in the table. They need to be indexed to make
ensuring referential integrity cheaper to maintain, but (except in
very unusual circumstances) I find it hard to see why they need to be
in a primary key.

Just my 10c worth.


-- 
Bruce Clement

Home:   http://www.clement.co.nz/
Twitter:        http://twitter.com/Bruce_Clement
Google Buzz: http://www.google.com/profiles/aotearoanz

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to