Re: Natural keys vs Aritficial Keys
Date: Thu, 28 May 2009 17:28:12 +0000 (UTC)
Message-ID: <gvmhjc$u9q$4_at_mud.stack.nl>
Walter Mitty wrote:
>An even stronger claim would be the claim that all designs that are NOT
>based on a synthetic auto-generated key are somehow defective designs. I've
>not seen this claim in exactly these words over in stackoverflow.com. But
>some of the comments seem to me to imply that the author of the comment
>holds this view.
This is certainly an attitude or assumption I often encounter.
>A comment that is often stated is that the author's personal preference is
>to ALWAYS assign an auto-generated integer field as the first field of every
>table, and to name this column ID. Let's leave aside the use of the word
>"field" rather than column, and the universal name ID. What seems to be
>missing in the ensuing discussion is that always using an autogenerated
>field for reference reduces addressing by content to a parody of addressing
>by location. All of the defects of graph based database organization
>resurface in a different guise.
Not necessarily. Leaving aside the use of the word "column" rather than attribute, what seems to be missing in the above discussion is the possibility of a middle ground. Introducing ID columns doesn't necessarily imply doing away with natural keys or other relational schema design criteria. Solely basing the design on them does.
-- ReinierReceived on Thu May 28 2009 - 19:28:12 CEST