Re: Multi-Field Primary Key
- From: "BruceM" <bamoob@xxxxxxxxxxxxxxxxx>
- Date: Tue, 9 Jan 2007 07:34:13 -0500
The OP, explaining his understanding of your comments, wrote "the worst
arrangement is to have the autonumber alone be the primary key because it is
completely random and irrelevant". I questioned whether a phone number is
less random in terms of ordering. I understand that it is natural in the
sense that it corresponds to a real-world application, but it is unlikely to
be used for ordering except maybe in the case of a call list. That being
the case, combining autonumber with phone number offers dubious advantage at
best over autonumber alone.
I understand a case may be made for natural keys, but I tend to regard
invariable rules with some suspicion.
"Jamie Collins" <jamiecollins@xxxxxxxxxx> wrote in message
news:1168338291.378308.38260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BruceM wrote:
what is "natural" about a phone number?
A natural key can be verified in the reality being modelled (hint: pick
up the phone, press the buttons). If you are lucky, the natural key
will have a trusted source who will handle the rare (hopefully)
occurrences of duplicate entities (<flippant> and if you are unlucky,
the trusted source will be a phone company; Bill Bryson's three laws of
nature: you can't re-live the past, the waiter can't see you until he's
ready and you can't beat the phone company </flippant>).
In case your question was, "Is phone number better than autonumber as
regards clustering?" my answer would be, I suspect not but it will
depend on the primary usage of the table. From my experience with
(paper) telephone directories, physical ordering on subscriber name
(last name, first names) suits my primary usage better.
I'll just mention that a many people, including Access MVPs, consider
autonumber to be a perfectly acceptable and efficient choice for PK.
I'll just mention that many people, including the Emperor's most
trusted advisors, considered his New Clothes to be a perfectly
acceptable choice for a state occasion <g>.
I can find all sorts of arguments pro and con on any topic, so the
existence
of advocacy for one position or the other does nothing by itself to sway
my
views.
That was *my* point. The fact you have found all sorts of people who
believe an autonumber PK makes a fine PK does not make it true.
So I'm the chump who's being duped by the slick-talking autonumber
heretics,
is that it?
You get to choose your own role. In the versions of the tale I've
heard, there has been no such role as "person pointing out that there
are people who think the Emperor is fully clothed" because, I guess,
such a role would be of no relevance to the plot. Me, I'm the small
child who, at the risk of public ridicule, questions popular belief
when it appears to be based on fallacy.
Jamie.
--
.
- Follow-Ups:
- Re: Multi-Field Primary Key
- From: Jamie Collins
- Re: Multi-Field Primary Key
- References:
- Re: Multi-Field Primary Key
- From: Allen Browne
- Re: Multi-Field Primary Key
- From: Jamie Collins
- Re: Multi-Field Primary Key
- From: nickh
- Re: Multi-Field Primary Key
- From: BruceM
- Re: Multi-Field Primary Key
- From: Jamie Collins
- Re: Multi-Field Primary Key
- From: BruceM
- Re: Multi-Field Primary Key
- From: Jamie Collins
- Re: Multi-Field Primary Key
- Prev by Date: Re: Multi-Field Primary Key
- Next by Date: Re: Multi-Field Primary Key
- Previous by thread: Re: Multi-Field Primary Key
- Next by thread: Re: Multi-Field Primary Key
- Index(es):