Re: What databases have taught me
Date: 23 Jun 2006 19:01:56 -0700
Message-ID: <1151114516.896285.158530_at_b68g2000cwa.googlegroups.com>
Bob Badour wrote:
> Consider:
>
> Ra = Rb AND x = 1 AND y = 1
>
> Where Ra and Rb are two relvars. Is that still a join? To what do x and
> y refer?
There is ambiguity caused by multiple equality signs. Did you mean
(Ra = Rb) AND x = 1 AND y = 1
or
Ra := (Rb AND x = 1 AND y = 1)
The first interpretation is absurd since there is no equality operator
in relational algebra. In the second case there is no longer equality,
but assignment := (and I still keep the redundant brackets for
clarity).
> Consider:
>
> R AND x = 1 AND y = 1
>
> where R has no x attribute. Will that cause a compile-time error? Why or
> why not?
No. The cartesian product of
R AND y = 1
with
x = 1
is the EXTEND operator.
I realize that this kind of thinking would steer quite away from exact Tutorial D semantics. BTW, only now I noticed that Tutorial D is bastardised version of D&D "A" algebra. Of course, it may be argued that the connection Tutorial D <--> "A" is better designed than SQL <--> RA, but this parallel is kind of ironic. Received on Sat Jun 24 2006 - 04:01:56 CEST