Re: Database design, Keys and some other things

From: JOG <jog_at_cs.nott.ac.uk>
Date: 4 Oct 2005 09:12:35 -0700
Message-ID: <1128442355.118491.265320_at_f14g2000cwb.googlegroups.com>


Marshall Spight wrote:
> Gene Wirchenko wrote:
> > On 1 Oct 2005 09:52:49 -0700, "Marshall Spight"
> > <marshall.spight_at_gmail.com> wrote:
> >
> > [snip]
> >
> > >We were discussing whether there was a difference between
> > >the natures of external ids vs. surrogate keys. What is
> > >essential to this question is what their nature is. Generally
> > >we do not regard context-specific considerations as essential.
> >
> > Was it murder or self-defence? Context.
>
> There are many domains where this sort of context is relevant.
> Mathematics is not on the list, however. Whether a number is
> an integer or not is not context-dependent. Given what's been
> said on this thread so far about the difference, it looks to
> me similar to the difference between the primary key and other
> candidate keys; a psychological, non-mathematical, contextual
> difference.

I'm still not clear why you believe it's just a psychological, contextual difference. A surrogate is immutable, a component of the internal predicate, while a natural is mutable, and a component of the 'external predicate' (I believe Codd, Date, Celko, et al. have all written about this in their discussions of the advantages and disadvantages of both). This isn't just an ephemeral difference, but a practical one, as a surrogate's domain is internally controlled. Perhaps I incorrectly view a surrogate as an internal reference point for a tuple - such things seem consistently useful to me (although i am obviously biased by my work with relationally based composite data-types). Either way, maybe the debate's exhausted, and we'll all get back to actually doing useful stuff with the RM. Received on Tue Oct 04 2005 - 18:12:35 CEST

Original text of this message