Re: Primary Key Theory Question

From: Laconic2 <laconic2_at_comcast.net>
Date: Mon, 29 Mar 2004 14:43:00 -0500
Message-ID: <o4udnaVNgIa_4fXd4p2dnA_at_comcast.com>


There are several problems with using SSN to identify "persons". I'll just list three of them:

Who controls the data item, and how accountable are they to you?

The government controls it, and their contract with you about this is very limited.
If they screw up, and assign the same number twice, it's your problem, not theirs.

What does the data item really identify?

An SSN identifies a social security acount, not a person. The relationship between SS accounts and persons is supposed to be one to one, but who knows? This is the most common mistake in picking natural keys: to pick a natural key that is in reality not an attribute of the entity under consideration, but an attribute of a related entity.

Does the data item have the same scope as your world view?

If the employees in your firm include people who live in Indonesia, they may not have an SSN. Are they "persons"?

If you've done a thourough E-R ananlysis, you'll have a list of key attributes for each entity. These ahould suggest natural keys at the data level. Errors and omissions in analysis often are not evident until later. Received on Mon Mar 29 2004 - 21:43:00 CEST

Original text of this message