Re: Stupid Database Tricks

From: Brian Selzer <brian_at_selzer-software.com>
Date: Thu, 07 Jun 2007 16:28:59 GMT
Message-ID: <fnW9i.7191$y_7.1014_at_newssvr27.news.prodigy.net>


"Marshall" <marshall.spight_at_gmail.com> wrote in message news:1181080989.066372.12120_at_a26g2000pre.googlegroups.com...
> On Jun 5, 12:47 pm, vldm10 <vld..._at_yahoo.com> wrote:
[snip]

>> 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