Re: Navigation vs Relational operators

From: Paul G. Brown <paul_geoffrey_brown_at_yahoo.com>
Date: 14 May 2004 17:00:06 -0700
Message-ID: <57da7b56.0405141600.89f461e_at_posting.google.com>


alfredo_at_ncs.es (Alfredo Novoa) wrote in message news:<40a4a902.3161946_at_news.tehnicom.net>...
> On 13 May 2004 10:00:50 -0700, paul_geoffrey_brown_at_yahoo.com (Paul G.
> Brown) wrote:
>
> > How do you 'navigate' union / projection / restriction / intersection /
> > outer-join / anti-join / difference / division?
>
> What anti-join is?

  Given two relations, R < a, b, c > and Q < a, d, e >, the anti-join   R [Aj] Q is all tuples from R where there does not exist a corresponding   tuple in Q meeting some join criteria.

  It's equivalent to SQL's

    SELECT *

      FROM R  
     WHERE NOT EXISTS ( SELECT 1 
                          FROM Q
                        WHERE R.a = Q.a ); 

   for example.

   It's often useful, in query planning, to 'flatten' the sub-query, because    there are a raft of other re-writes that you can do with an anti-join    and other join forms (and many you can't). You can think of it    in terms of a join and a difference if you like, but there are really    efficient physical operators for the anti-join Received on Sat May 15 2004 - 02:00:06 CEST

Original text of this message