Dear John:
What do you mean:
"But suppose that they did not WANT their name to be changed for the
convenience of a limited-intelligence computer program?"
Creating a natural key column for the internal use of the computer in
creating combo box lists, so these lists can have unique, recognizable
forms, does not amount to "changing their name". It amounts to having a
representation of their name that is just that, recognizable and unique. I
specifically propose to continue storing and using the formal version of
their names, so nothing they will ever see is changed whatsoever.
What it amounts to is this. If these two men worked in adjacent offices, I
truly believe that others in the office would quickly adopt a way of
referring to them distinctly and unambiguously. This is natural to
conversational language. So, why can't the computer do the same thing? Of
course, it can, and should.
That's what I mean when I say that there is not a lack in unique natural
keys. In speech and writing, humans will create a unique natural key and
make a convention of it.
I had a neighbor with the same first name as mine. Soon, everyone was
calling me Tom and him Tommy. Everyone knew who was meant by each. That's
a convention, it's natural, and happens all the time. People don't usually
prefer a formal distinction. They didn't start using both our last names,
but just consistently used variations of our first names to eliminate
ambiguity.
For your example, the natural key could be:
Wise, Dr LD bio
Wise, Dr LD chem
This might reflect the way the two were uniquely identified
conversationally. I was not prescribing the "2" as the only way they could
be distinguished. It's just that, in the absense of knowledge as to what
differences there were between these two, I just invented something.
In creating unique natural keys, there need not be just one method for
distinguishing one entity from another. It can be "bio" and "chem" one time
and "tall" and "short" the next. It can be "tall bio", "short bio" and
"chem" the next time, using a combination of attributes when necessary to
make them unique.
I do not present this as a perfect solution. I'm not sure there is one. I
present it as a workable solution, one that is practical and intuitive.
That's about the best for which we can hope.
I'm not arguing for natural key relationships here, although this is not
unrelated. I'm arguing that there must be a unique natural key if there is
to be a dependent table. If the natural key is not unique, and there is a
dependent table one-to-many, how will users be able to consistently and
reliably choose one of these two men to record awards they have received?
The two are indistinguishable until an award is assigned. Likely, after an
award is assigned, they are then unique on that basis. When assigning a new
award to one of them, the question arises, to which of them is this award to
be recorded? The one who already has an award, or the other one with no
award? Will the user posting that know the answer? It certainly matters to
which FK the dependent rows are posted. This posting, if done correctly,
likely does make the two unique, but not in a way that is likely to be
apparent to the person posting.
If there is no unique natural key, if there are two rows in the combo box
that are indistinguishable, how do you solve this? Since you do not seem to
agree with my proposed solution, what do you propose? Am I missing
something here?
Tom Ellison