Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: What to call this operator?

Re: What to call this operator?

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Fri, 1 Jul 2005 11:11:57 +0200
Message-ID: <MPG.1d2f2749e8c9dec59896c2@news.ntnu.no>


In article <1120066601.412830.82070_at_g47g2000cwa.googlegroups.com>, marshall.spight_at_gmail.com says...
> > However, the symmetry/duality is lost in the semantics of the
> > operations---the relation predicate of the result. If relvars A and B
> > have predicates PA and PB, respectively, the expression A JOIN/<AND> B
> > has the predicate PA AND PB (logical and) in both D&D and Tropashko.
> > However, D&D's A <OR> B has the predicate PA OR PB (logical or), while
> > Tropashko's A UNION B has a rather more complicated and less intuitive
> > predicate (on first glance).
>
> I look at it this way:
>
> (I'll call Tropashko's operator "generalized union.")
>
> A natural join B: the union of the columns and the intersection of the
> rows
>
> A generalized union B: the intersection of the columns and union of the
> rows.
>
> Quite symmetric, as I see it.

Yes, but the relation predicate is not. Given relations A(x,y) and B (y,z) with predicates PA(x,y) "employee x works in department y" and PB (y,z) "department y is led by manager z".

The predicate PJAB(x,y,z) of A join B is "employee x works in department y, and department y is led by manager z" (or more simply, "employee x works in department y which is led by manager z").

The predicate PUAB(y) of A generalized union B is "there exists an employee x such that employee x works in department y, or there exists a manager z such that department y is led by manager z"

Whereas the predicate POAB(x,y,z) of A <OR> B is "employee x works in department y, or department y is led by manager z".

Questions of usefulness may of course be raised; I am merely pointing out that there is a lack of symmetry from this viewpoint.

-- 
Jon
Received on Fri Jul 01 2005 - 04:11:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US