Re: Newbie question about db normalization theory: redundant keys OK?

From: Brian Selzer <brian_at_selzer-software.com>
Date: Wed, 19 Dec 2007 19:32:16 GMT
Message-ID: <4leaj.56191$eY.1078_at_newssvr13.news.prodigy.net>


"David Portas" <REMOVE_BEFORE_REPLYING_dportas_at_acm.org> wrote in message news:I5-dne_KXtjhnvTaRVnyhAA_at_giganews.com...
> "Brian Selzer" <brian_at_selzer-software.com> wrote in message
> news:542aj.25103$4V6.21112_at_newssvr14.news.prodigy.net...
>>
>> You're right about DELETE and INSERT, but not about UPDATE. If you look
>> at UPDATE in TTM (pps. 112-113), you can see what happens:
>>
>> UPDATE r ( Ai := X, Aj := Y)
>>
>> where i <> j is supposedly equivalent to
>>
>> ( ( EXTEND r ADD ( X AS Bi, Y AS Bj ) ) { ALL BUT Ai, Aj } )
>> RENAME ( Bi AS Bk, Bj AS Aj, Bk AS Ai )
>>
>> where Bi, Bj, and Bk are arbitrary distinct attribute names that do not
>> appear in r.
>>
>> Now if you look at the result of
>>
>> EXTEND r ADD ( X AS Bi, Y AS Bj ),
>>
>> you'll notice that each tuple has both the old values and the new values
>> for each affected attribute. Clearly if Ai or Aj is prime, then that
>> information that ties each tuple in the result to its corresponding tuple
>> in r is projected away by "{ ALL BUT Ai, Aj }". Information is lost.
>> The result may be the same, but how that result was arrived at is lost in
>> translation, and therefore cannot be verified.
>>
>
> "Information is lost" but no-one ever said that relational operators have
> to be reversible. I don't know what you mean by "cannot be verified" - the
> result is what it is. Assignment is still primitive because you haven't
> shown how an UPDATE can give a result that cannot be obtained by
> assignment.
>

If assignment is primitive, then it cannot necessarily be determined whether the properties of an individual that existed before an assignment are now different or that an individual that did not exist before the assignment now does. If, on the other hand, update is primitive, then there is no doubt. Since an update specifically targets information about what already exists, and since the update includes information about those individuals both before and after, there is no doubt as to whether the individuals in question existed. This is what I mean by "cannot be verified."

I think I indicated that the result may be the same. If I want a new Ferrari, I can buy one or I can steal one. In both cases the result is the same--I would possess a new Ferrari--but how I ultimately arrived at that result is significant, because in the one case I would be in debt up to my eyeballs, but in the other case I would be on the run from the law.

> --
> David Portas
>
>
Received on Wed Dec 19 2007 - 20:32:16 CET

Original text of this message