Re: A pk is *both* a physical and a logical object.

From: Brian Selzer <>
Date: Mon, 23 Jul 2007 14:57:13 GMT
Message-ID: <dl3pi.23809$>

<> wrote in message

> On Jul 18, 4:08 pm, "Brian Selzer" <> wrote:

>> "Roy Hann" <specia..._at_processed.almost.meat> wrote in message
>> > "Brian Selzer" <> wrote in message
>> >news:oXdni.23174$
>> > [snip]
>> >>> You can call what the user issued an update, if you care to, but
>> >>> what
>> >>> really happened is that an individual, identified by the before
>> >>> value
>> >>> of
>> >>> the key, was deleted, and a new individual, identified by the after
>> >>> value
>> >>> of the key was inserted. The fact that the old value and the new
>> >>> value
>> >>> used
>> >>> the same storage ("row", if you like) is irrelevant. They are
>> >>> different
>> >>> values, and they designate different individuals.
>> >> Not so. Consider the following statement:
>> >> I moved the widgit with lot number 203 at location 22 to location 44.
>> > What is the so-called "individual" here? The widget, the lot number or
>> > the location? You've told us the key is the entire header, so it is
>> > irreducible, so none of these is inescapably unique in this table.
>> The widgit.
>> >> Now assuming that there can only be one widgit from the same lot at a
>> >> particular location, then the definite description before the update,
>> >> the widgit with lot number 203 at location 22
>> >> refers to the same widgit as the definite description after the
>> >> update,
>> >> the widgit with lot number 203 at location 44.
>> >> If there is also a rigid designator, then the situation becomes clear:
>> >> before the update, these all denote the same individual:
>> >> the widgit with serial number 123 and with lot number 203 at location
>> >> 22
>> >> the widgit with serial number 123
>> >> the widgit with lot number 203 at location 22
>> >> which is the same individual as these:
>> >> the widget with serial number 123 and with lot number 203 at location
>> >> 44
>> >> the widget with serial number 123
>> >> the widget with lot number 203 at location 44
>> >> after the update.
>> >> So, if relation widgits {lot_number, location}
>> >> has a tuple {lot_number=203, location=22}
>> > How the heck does this tuple represent *anything* about widget 123 (or
>> > any
>> > other particular widget) if the serial number isn't an attribute? The
>> > only way it can do that is if you first assert your entire relation
>> > represents propositions about the widget with serial number 123
>> > exclusively. That's fair enough and I'd have no problem with it, but
>> > you
>> > aren't saying that.
>> It doesn't. I introduced serial number to illustrate the point that the
>> same individual can exist at different possible worlds even if its
>> definite
>> description is not rigid. At this point that point had already been
>> made.
>> What followed ties that fact back to databases.
>> {lot_number, location} is the key for widgits. (Again, there can only be
>> one widgit with the same lot number at a particular location.) So
>> {lot_number=203, location=22} identifies a particular widgit at a given
>> database value.
>> >> and an update is issued:
>> >> UPDATE widgits SET location=44 WHERE lot_number = 203 AND location=22
>> >> Then the resulting relation has a tuple
>> >> {lot_number=203, location=44}
>> >> that refers to the same individual as the tuple
>> >> {lot_number=203, location=22}
>> >> before the update.
>> > I am now satisified that you are talking nonsense. Erudite-sounding
>> > nonsense but still nonsense.
>> > Roy
> This has been analyzed before on cdt, and as I recall Brian misses the
> point that an 'individual' is only characterized by its identifying
> attributes, and that there is nothing more to its nature whatsoever.
> What we deem as identifying attributes may vary from one application
> to another, and as they do so varies the definition itself of what
> actually makes up the 'individual' too This can sounds unintuitive  to
> many (even though they naturally resolve such variations in their
> everyday conversations all the time), so I can easily see where the
> confusion comes from.
> I actually prefer the term 'construct' to thing, entity or individual
> within database design (even in spite of its semantic overloading)
> because it highlights that when we define an item's identifiers,
> attributes and boundaries,  we do so in our heads, that these
> definitions are not god-made, and that they can change quite happily
> from one situation to another.
> In this case, if you use the schema {lot_number, location} then you
> are saying that the widget construct being discussed is identified by
> the lot_number/location pair, and as far as your universe of discourse
> is concerned /that is it/. If that was not the case (and serial_number
> is the identifying attribute for the individual being constructed)
> then that should have been used. However if the attribute you defined
> as the identifying property changes, well then, it is now a different
> item according to your description of the world.
> I believe this very subtle issue (and it is one which I grappled with
> for a long time), but that it is the cause of many serious database
> design errors. How you identify your constructs in the real world
> should correspond to how you identify them in the database's
> propositions, otherwise your setting yourself up for a serious fall in
> the future.

I don't miss the point: I dismiss it not only because it is a gross oversimplification based upon faulty assumptions but also because it is incorrect. Although a key value identifies (or is a surrogate for) an individual in the Universe of Discourse, it is not correct to assume that the same key value identifies the same individual at every database value in which it appears. Here's proof: given a relation schema with two keys, one whose values rigidly designate individuals and one whose values represent non-rigid definite descriptions for individuals, there can be a tuple in each of two possible relation values that has the same value for the rigid key, but different values for the non-rigid key. Here each individual has two sets of identifying properties: one that identifies the individual at all possible states of affairs and one that identifies the individual at a particular state of affairs.

Again, the definition of a candidate key does not demand that its values designate rigidly. All that is required is that within the bounds of each possible database value, (1) each key value uniquely identifies a tuple in a relation value (and thus indirectly an individual in the Universe of Discourse) and (2) no proper subset of the key value also uniquely identifies a tuple in a relation value. Because the tuples above have the same value for the rigid key, the tuples refer to the same individual--even though they have different values for the non-rigid key. So, since it is clearly possible for different key values to identify the same individual at different database values, it is also possible for the same key value to identify different individuals at different database values.

The point is incorrect because it states "that there is nothing more to its nature whatsoever." This is another gross oversimplification, and is quite frankly, nonsense. An essential property may apply to all individuals, for example, the property that an individual can be combined with others to form atomic facts. Essential properties are part of an individual's nature, yet here's one that cannot be used to identify an individual because every individual has it. In addition, as has been shown above, there can be sets of identifying properties that are not also essential properties. Proper names are not essential properties, they are extrinsic properties that have been assigned by another individual. So, part numbers, supplier numbers, customer numbers, employee numbers--all would be considered proper names in the sense that they are rigid designators that are not also rigid definite descriptions. As such, they are not even part of the nature of the individuals they designate.

What I was trying to say when I brought this up is that there can be theoretical justifications for distinguishing one candidate key as the primary key. In fact, the only times that the choice becomes arbitrary are when more than one key rigidly designates individuals and when no key rigidly designates individuals.

--Brian Received on Mon Jul 23 2007 - 16:57:13 CEST

Original text of this message