Re: thinking about UPDATE

From: Mikito Harakiri <mikharakiri_at_iahu.com>
Date: Thu, 22 Jul 2004 13:21:17 -0700
Message-ID: <axVLc.54$X73.173_at_news.oracle.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...
> 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

Consider FD

{A.X, A.Y} -> {A.Z}

whish means

not exists a1,a2 ( a1.x = a2.x & a1.y = a2.y & a1.z != a2.z )

This expression in RA is formally view equation

sel(a1.x = a2.x) sel(a1.y = a2.y) sel(a1.z != a2.z) A(+)A = {}

where (+) denotes Cartesian Product

Let's apply projection to both sides of the equation:

prj({a1.x, a1.z}) prj({a2.x, a2.z}) sel(a1.x = a2.x) sel(a1.y = a2.y) sel(a1.z != a2.z) A(+)A = {}

Projection commutes with selection and cartesian product (does it?) so that we can push it all way down to the base relation

sel(a1.x = a2.x) sel(a1.z != a2.z) [prj({a1.x, a1.z})A](+)[prj({a2.x, a2.z})A] = {}

Which proves that the "projected" FD holds in a projected relation. Received on Thu Jul 22 2004 - 22:21:17 CEST

Original text of this message