Re: Relational symmetric difference is well defined

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 30 May 2007 09:18:33 -0700
Message-ID: <1180541913.456880.32900_at_g37g2000prf.googlegroups.com>


On May 29, 11:27 pm, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:
> Marshall wrote:
> > Other symmetric differences:
>
> > (A /\ B) \ (A \/ B)
>
> > Produces an empty relation with the symmetric difference
> > of the attributes of A and B. (Symmetric difference of
> > columns, no rows.)
>
> > (A \/ B) \ (A /\ B)
>
> > Produces 01 if A and B have attributes in common
> > that have values that are not in common; 00 otherwise.
> > (Symmetric difference of rows; no columns.)
> > (Same as both sides of OP's equation.)
>
> So \ isn't antijoin after all? It removes attributes?

Let's do "attribute count". Suppose A(x,y) and B(y,z), then

A \/ B has attribute set {y} and
A /\ B has attribute set {x,y,z}
Therefore,
(A \/ B) \ (A /\ B)
has to have attribute set {y}, and Marshall's assertion that "(A \/ B) \ (A /\ B)
produces 01 if A and B have attributes in common" appears to be incorrect.

BTW, symmetric difference is well defined in D&D algebra too, so I have to tone down my original message. The other implication is perhaps that the set of operations:

  1. join
  2. inner union
  3. symmetric difference
  4. set equality join

is "more symmetric" with the respect of their actions upon the attribute sets, as opposed to

  1. join
  2. inner union
  3. antijoin
  4. set containment join (aka relational division)
Received on Wed May 30 2007 - 18:18:33 CEST

Original text of this message