Re: thinking about UPDATE

From: x <x-false_at_yahoo.com>
Date: Tue, 27 Jul 2004 09:13:54 +0300
Message-ID: <4105f29d_at_post.usenet.com>


  • Post for FREE via your newsreader at post.usenet.com ****

"Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message news:pan.2004.07.26.17.41.23.393221_at_REMOVETHIS.pandora.be...
> On Mon, 26 Jul 2004 16:07:11 +0300, x wrote:
> > **** Post for FREE via your newsreader at post.usenet.com ****
> > "Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message
> > news:pan.2004.07.22.18.06.23.604113_at_REMOVETHIS.pandora.be...
> >
> >> If K is the set of original candidate keys and P is the set of
attribute
> >> on which we project then:
> >> - Let K' = { k in K | k subset P }
> >> - If K' is not empty then return K' otherwise { P }
> >
> >> > Also I note that my post here is simply thinking out the
> >> > cases, and I have no formalism to back this up. Does anyone
> >> > have any suggestions as to a formalism to apply to either
> >> > prove or disprove the above?
> >
> >> Yep, normalization theory. You can translate the candidate keys to
> >> functional dependencies and these always also hold for the projection,
and
> >> those that hold for the projection also hold for the original relation.
So
> >> the proof of completeness goes something like this.
> >
> >> Suppose that in the projection we have a candidate key A that is not in
> >> K'. Then the FD A->P holds in the projection, but also in the original
> >> relation. However, the only FDs that hold in the original relation are
> >> those that are implied by its CKs so A must have already been a CK in
the
> >> original relation. But then A is by definition in K' which leads to a
> >> contradiction. So the original assumption that the projection has a CK
> >> that is not in K' must be false. QED

> > What made you think this:
> > "However, the only FDs that hold in the original relation are those that
are
> > implied by its CKs"

> That's part of the theorem that is being proven. Try writing it out in
> full (that's not as easy as you perhaps would expect) and you will see
> what I mean.

No. It is not.
If you start with *any* relation, the proposition you stated is false. The proposition is true only for a relation in some normal form.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  • Usenet.com - The #1 Usenet Newsgroup Service on The Planet! *** http://www.usenet.com Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Received on Tue Jul 27 2004 - 08:13:54 CEST

Original text of this message