Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Surrogate Key vs Production Key

Re: Surrogate Key vs Production Key

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: 8 Oct 2004 05:49:30 -0700
Message-ID: <73e20c6c.0410080449.50e0a1fd@posting.google.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1097210055.635712_at_yasure>...

> Joe Celko weighs in on the side of natural keys and so do I.
>

Joe never had a client walk in and say:

"you know that code of 'A/0001/sdkjskldjklsd-32998'? Shewt!: we mistyped it.
Can you change it to 'A-0001/sdkjskldjklsd/32998'? "

and suddenly he realizes that natural key is now duplicated in a 6 level hierarchy of tables as a FK in thousands of rows. Which means a major UPDATE on all those tables with all RI disabled. Count the downtime.

Zero problem with surrogates. I'll take that anytime. For the cost of an extra index. Because I still have to see a natural key that somewhere, somehow, doesn't get mistyped.

Errare humanum est...
To really stuff things up, you need a natural key. Received on Fri Oct 08 2004 - 07:49:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US