Re: Stupid Database Tricks

From: Marshall <>
Date: Mon, 11 Jun 2007 16:13:06 -0000
Message-ID: <>

On Jun 11, 1:40 am, "Brian Selzer" <> wrote:
> "Keith H Duggar" <> wrote in > > Brian Selzer wrote:
> >> Marshall wrote:
> >> > If the table has only two columns, as I specified, then it
> >> > [value1,value2] is necessarily unique, by the definition of
> >> > relation. Even it it wasn't, as may be the case in badly
> >> > executed SQL tables, there is still no value in adding an
> >> > additional column which will contain no further information.
> >> The problem is not that the key values aren't unique within a single
> >> extension of the database, it is that a key value may identify one object
> >> in
> >> the universe in one extension and a different object in another. A
> >> surrogate key solves this problem because there is a bijective mapping
> >> between the values in the surrogate domain and all possible objects in
> >> the
> >> universe of discourse.
> > There is no such "object" as an "object". If you stop thinking
> > in terms of "objects" and "entities" then you will stop having
> > the fake problems which lure you to the surrogate ID crutch.
> I would have to stop thinking altogether: without objects there can be no
> conception; without objects there can be no perception; without objects
> there can be no discourse!

Well, that seems a bit overstated. I think abstract algebra shows us that it's possible to work usefully with a formal system even without having a specific model in mind.

I'm unclear exactly how to read your use of the word "extension" above.
Do you mean the semantic connection with the universe of discourse? Or a specific database value or instance? Hair extensions? (j/k)
Probably a more specific, less ambiguous term would be better.

It also seems you're suggesting that surrogate key should be *globally* unique. Do you mean that? If so, yuck.

> (Perhaps I should have used the term "individual" instead of "object" to
> avoid confusion.)

I don't see how one could improve on "proposition" and "predicate."

Marshall Received on Mon Jun 11 2007 - 18:13:06 CEST

Original text of this message