Re: Stupid Database Tricks

From: Brian Selzer <>
Date: Thu, 07 Jun 2007 16:28:59 GMT
Message-ID: <fnW9i.7191$>

"Marshall" <> wrote in message
> On Jun 5, 12:47 pm, vldm10 <> wrote:

>> Here, you misunderstood - what is not primary key. Pair (key1, key2)
>> is not primary key because it is not unique.
> If the table has only two columns, as I specified, then it 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. In addition, every other domain defined in the database necessarily maps injectively into the surrogate domain. As a result, Kripke semantics can be used to deal with the set of all valid extensions and the set of transition constraints, which I believe is isomorphic to the accessibility relation in a Kripke Frame. Also, it is my understanding is that a system with a fixed domain is more expressive than one with a world-relative domain. So I would argue that there is indeed value in adding an additional column.

[snip] Received on Thu Jun 07 2007 - 18:28:59 CEST

Original text of this message