Re: Trend towards artificial keys (GUIDs) sez my textbook...is AI next?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Mon, 17 Dec 2007 12:02:04 -0400
Message-ID: <47669d7d$0$5258$9a566e8b_at_news.aliant.net>


raylopez99 wrote:

> On Dec 16, 3:00 pm, Hugo Kornelis
> <h..._at_perFact.REMOVETHIS.info.INVALID> wrote
>
>

>>>So, from this passage, I think the author does a good job disclaiming
>>>the slavish use of GUIDs without understanding their drawbacks, even
>>>after the author said he's a "big fan" of such GUIDs.
>>
>>True. But in the rest of his book, he adds a surrogate key (either GUID
>>or IDENTITY) to every entity before and without considering whether one
>>is needed. I believe that logical design should be done completely
>>without surrogate keys. They MIGHT be introduced during physical design,
>>but not before.

Hugo, keys are logical constructs. I fail to see their relevance to physical design.

> OK I'll keep this in mind when trying to architect a database system--
> use natural keys. Which is easier said than done: how unique is
> anybody nowadays ('hair color, height, weight, name, shoe size') with
> 300M Americans and 9B people on the planet? I'm not sure even a GUID
> is 100% safe with those big numbers?! Maybe we need biometrics. But
> I guess most databases are not designed to be so scalable anyway, so
> perhaps natural keys are indeed the best bet.
>
> RL

Ray, there is no simple rule. The design criteria for keys are: simplicity, familiarity, stability, uniqueness, irreducibility.

You would do yourself a favour by writing them on a post-it note right about now.

Sometimes they conflict and one has to make tradeoffs. The ideal key will have all 5 of those properties. Sometimes no such ideal key exists. At such times, one must understand why each of the above properties is important and what problems will ensue from not having the property.

Sometimes it is possible to invent something that has all of the above properties. For example, when an employer assigns a number to every employee, prints it on a card and tells each employee to include their number on all correspondence, the employer is inventing exactly such a key. Employers were doing that long before computers arrived.

I am not exactly sure what you mean when you say "GUID". If you mean a 128 bit number encoded in hexadecimal and broken into fields, such a thing is neither simple nor familiar to anyone. Received on Mon Dec 17 2007 - 17:02:04 CET

Original text of this message