Re: thinking about UPDATE

From: Mikito Harakiri <mikharakiri_at_iahu.com>
Date: Thu, 22 Jul 2004 15:13:24 -0700
Message-ID: <haXLc.57$X73.296_at_news.oracle.com>


"Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message news:pan.2004.07.22.21.49.40.338698_at_REMOVETHIS.pandora.be...
> On Thu, 22 Jul 2004 13:21:17 -0700, Mikito Harakiri wrote:
> > Projection commutes with selection and cartesian product (does it?)
>
> It does, if you select on attributes that you project. So
> to be completely correct you probably should have said:
>
> prj({a1.x, a1.y, a1.z}) prj({a2.x, a2.y, a2.z}) sel(a1.x = a2.x) sel(a1.y
> = a2.y) sel(a1.z != a2.z) A(+)A = {}
>
> But that's nitpicking.

That's quite important case.

FD {X}->{Y} for relation A corresponds to view (or should I say relational?) equation

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

Likewise, FD {}->{Y} for relation proj(Y)A corresponds to view equation

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

On the other hand, given

Rel A
^^^^^

X Y
- -
1 a
2 b

it is easy to see that first FD holds on A, while the second one fails on proj(Y) A.

Therefore, the corrected statement should read: "projected" FD holds in a projected relation as long as the columns that were "projected away" are not in FD LHS. Received on Fri Jul 23 2004 - 00:13:24 CEST

Original text of this message