Re: A different definition of MINUS, Part 3
Date: Sun, 21 Dec 2008 18:04:37 -0800 (PST)
Message-ID: <43236811-a0c6-4aa3-9ff7-a572f8f14684_at_z28g2000prd.googlegroups.com>
On Dec 21, 4:13 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Projection, to me, doesn't seem like any sort of union.
OK, in classic relational algebra union can only be applied to the
relations with the same header (that is set of attributes). Therefore,
when generalizing union to become applicable to any pair of relations
one must decide first, what the header the resulting relation should
have. D&D assumed it has to also be a union, but I suggest that it can
be anything: intersection, difference, or even symmetric difference.
However, the last two choices are no good: symmetric difference would
make the generalized version of the union incompatible with classic RA
union, while difference operation is not symmetric, thus rendering
generalized union nonsymmetric as well. Therefore, the only
alternative to D&D version of the union is "inner union": it
intersects over headers, and unions over tuples. Compare it to join
that intersects on tuple level, and unions headers.
Next one may compare D&D <AND>&<OR> based system, with RL join&inner
union based one in terms of consistency. Both have arguments in their
favor. D&D system honors distributivity, and De Morgan laws. RL honors
absorption, so that the subset relation can be generalized to be
applicable to any pair of relations. Also RL can express projection as
an (inner) union of a relation with an empty relation. First, tuples
in both relations (there are none in the second!) are collapsed to the
common set of attributes. These are essentially projections. Then we
make a union of projections, but keep in mind that the second
projection is empty!