Re: Primary vs. Surrogate! What a nightmare debate.
Date: Sun, 17 Oct 2004 07:15:54 -0400
Message-ID: <BYGdnYNGjY3qye_cRVn-rA_at_comcast.com>
"Kostas" <noemail_at_noemail.net> wrote in message
news:10n47jojjcm9gdd_at_corp.supernews.com...
> I must be reading all day on the issue and I am more confused then when I
> started.
> I started my db's with natural keys as I initially was exposed to the
theory
> of relational db's and wasn't just assigned the task of building something
> quick and dirty.
> Then I reverted to surrogates for a while, and now, that I made my
comeback
> designing some more serious systems (but still relatively small) I decided
> to settle this once and for good.
>
> My idea was that I should be consistent, that is, use either surrogate or
> natural but not both. Well, it turns out that sometimes there just isn't a
> natural key good enough for a relation, and that hundreds of so called
> experts have extremely diverging opinions. To top that, both sides'
> arguments look valid.
>
> My conclusion is that for small applications try to go with the natural
key
> when it is readily available, but for large-scale warehouse applications
> surrogates should be seriously considered. At some points, this looks like
a
> decision that has to be taken on an individual per/table basis.
>
> I was just wondering what the tendency among you people is...since this ng
> has "theory" in it I am daring to guess where your vote goes to, but I had
> to inquire nevertheless.
>
> Cheers!
> Konstantinos
>
>
"Everything should be made as simple as possible, but not simpler than that." -- Einstein
I think you are looking for a solution that's too simple. Sometimes surrogate keys are best. At other times natural keys are best. It depends. Received on Sun Oct 17 2004 - 13:15:54 CEST