Re: NextNumbers Tables

From: Pablo Sanchez <pablo_at_dev.null>
Date: Tue, 11 Feb 2003 22:17:45 -0600
Message-ID: <Xns931FD8A286848pingottpingottbah_at_216.166.71.233>

"Jason W. Paul" <> wrote in news:3e49a949$0$99441$

> "stu" <> wrote in message
> news:b28ims$phi$1$
> [snip]

>> Why?  My uni teacher used to say always use a surrogate key.  It stops
>> you from duplicating keys later.  What advantages does it have over
>> using IDs? 

> Fire your uni "teacher" or apply to a different school!
> "Always" is pretty harsh. There are times (to the dismay of the
> "theorists" in this group) where they do actually make sense -- but to
> use them "always" is rather foolish. If your "teacher" can't explain why
> then you need to drop the class and wait 'til someone with half a brain
> instructs the class.

Personally I always use them because I like being able to take advantage of them to handle things like browsing data sets online. Also, it gives me the protection from the business when they tell me that something will absolutely never ever ever change. Then it changes next week.

As I previously posted, I do implement natural keys in addition to surrogate keys.

I've notice that surrogate keys vs natural keys seems to be a religous debate so ... oh well. :)

Pablo Sanchez, High-Performance Database Engineering
Received on Wed Feb 12 2003 - 05:17:45 CET

Original text of this message