Re: Multi-Field Primary Key



BruceM wrote:
So I'm the chump who's being duped by the slick-talking autonumber
heretics, is that it?
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. Autonumber works fine for my purposes, but
my point, which you ignored, was that even if I was to accept your
position on "natural" keys, what is "natural" about a phone number? Unless
you are sorting by phone number to find gaps or something like
that the ordering of a phone number field is surely as arbitrary as
an autonumber field.

Bruce there are two different philosophies at issue here.

Surrogate numeric keys (AutoNumber or otherwise) do solve a lot of technical
problems for database and database application developers and many seasoned
professionals who know what they are talking about use them and recommend
them. However; they are not part of proper Relational Database Design
Theory.

If you are discussing the construction of "proper" relational databases then
surrogates will be argued against by the experts almost without exception.
If you are discussing the practical pitfalls and solutions of building
working databases then you will find a lot of people who make their living
doing such things arguing for the use of surrogate keys.

These really are two different discussions, but often the boundaries get
blurred during exchanges in these groups. I for one have no problem with
the judicious use of surrogate keys and often use them myself. However; I
avoid making statements like "All Primary Keys should be numeric surrogates"
because their use is simply not warranted in every case and my preferences
are not applicable in every case. I will point out their advantages when
discussing databases with other developers, but I would not fault the
decision of another developer not to use them.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • Re: How should I generate a primary key?
    ... the external reality and verify them. ... be verified for syntax or check digits inside itself. ... A surrogate key is system generated to replace the actual key behind ... with a quote from Dr. Codd: "..Database users ...
    (comp.databases)
  • Re: Guidelines to a decent support of surrogate key implementation
    ... totally unrelated to the logical data model. ... A surrogate key is system generated to replace the actual key ... with a quote from Dr. Codd: ... Extending the database relational model to capture more meaning. ...
    (comp.databases.theory)
  • Re: Surrogate Keys: an Implementation Issue
    ... proposition became known by the database, ... One doesn't need a surrogate for that. ... There should be a second candidate key on every relation. ... instances that are identical with exception of the object identifier. ...
    (comp.databases.theory)
  • Re: Surrogate Keys: an Implementation Issue
    ... value identifies a proposition in the database, ... One doesn't need a surrogate for that. ... There should be a second candidate key on every relation. ... instances that are identical with exception of the object identifier. ...
    (comp.databases.theory)
  • Re: Surrogate Keys: an Implementation Issue
    ... value identifies a proposition in the database, ... One doesn't need a surrogate for that. ... There should be a second candidate key on every relation. ... instances that are identical with exception of the object identifier. ...
    (comp.databases.theory)