Re: Question about Date & Darwen <OR> operator

From: paul c <toledobythesea_at_oohay.ac>
Date: Sat, 03 Sep 2005 02:38:32 GMT
Message-ID: <I08Se.361522$s54.313958_at_pd7tw2no>


Mikito Harakiri wrote:
> Marshall Spight wrote:
>

>>A <OR> B = { (a,ab,b) |
>>  ((a,ab) in A cross product Tb)
>>  union
>>  ((b,ab) in B cross product Ta)
>>}
>>
>>Is that sufficiently formal? What would constitute a
>>sufficiently formal form?

>
>
> My reply that your expression { (x, y) | x = 1 or y = a } is formal
> enough is lost somewhere in Google groops:-)
>
> Well, the formal definition of <OR> and <AND> seems to be very
> consistent with boolean logic. Take
>
> Relation A
> x y
> - -
> 1 a
> 2 b
>
> and
>
> Relation B
> y z
> - -
> a #
> b %
>
> Then, formally relation A is a proposition
>
> x=1 & y=a \/ x=2 & y=b
>
> while relation B is
>
> y=a & z=# \/ y=b & z=%
>
> The <OR> is just formal disjunction
>
> x=1 & y=a \/ x=2 & y=b \/ y=a & z=# \/ y=b & z=%
>
> that could be equivalently transformed into
>
> x=1 & y=a & z=# \/
> x=1 & y=a & z=% \/
> x=2 & y=b & z=# \/
> x=2 & y=b & z=% \/
> x=1 & y=a & z=# \/
> x=2 & y=a & z=# \/
> x=1 & y=b & z=% \/
> x=2 & y=b & z=%
> ...

i like the precise way you put this. for one thing, it makes it clearer what <OR> means (ie. 'insert') and almost as clearly what <NOT> <AND> (ie. 'delete') mean.

> followed by collapse of identical disjunction terms. Likewise, the
> <AND> operation could be defined. Therefore, the D&D algebra
> intuitively looks like boolean algebra, but it is certainly not.
> Absorption, doesn't hold: relation headers monothonically increase, so
> that there is no way for headers to match. Therefore, this nice boolean
> logic must break somewhere. Where?
> ...

i may be missing the question (wouldn't be the first time) regarding 'no way for headers to match', but i presume that's why they have <REMOVE> in A-algebra (they also require projection in TutorialDee). i'm assuming you mean something like a db with a couple of hundred relations each of which had, say, ten attributes of which only one is common with some other relation, so the equivalent single relation for that database would have something like 9 X 200 = 1800 attributes (plus many,many,many tuples! likely, no person could compose that expression, but maybe there's a reason for a machine to do it. i don't know why, though. if that's what you mean by 'break', i guess you're right in theory.

FWIW, i tend to think that the headers keep expanding as long as i'm talking about different things. as soon as i start talking about the same things, the headers stay the same.

from what i've read, D & D seem to want the traditional 'closure' idea of an relational expression, always resulting in a single relation. i've wondered why we couldn't have two or more relations in a result. there must be times when that's just as pragmatic and cheaper in space terms. still, the A-algebra seems a very neat way to get the single closure effect.

p Received on Sat Sep 03 2005 - 04:38:32 CEST

Original text of this message