W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2007

Re: question on UNION

From: Andrew Newman <andrewfnewman@gmail.com>
Date: Tue, 5 Jun 2007 16:32:13 +1000
Message-ID: <2db5a5c40706042332v753847d4vecaf80f036991f06@mail.gmail.com>
To: "Steve Harris" <swh@ecs.soton.ac.uk>
Cc: public-sparql-dev@w3.org

On 6/5/07, Steve Harris <swh@ecs.soton.ac.uk> wrote:
> On 5 Jun 2007, at 06:55, Andrew Newman wrote:
> > On 6/5/07, Steve Harris <swh@ecs.soton.ac.uk> wrote:
> > Isn't it just outer union?  And isn't outer union just part of SQL 92.
> > And isn't SQL 92 implemented by most (all?) databases.
>
> In a sense. You can expand any SPARQL UNION into a set of SQL UNIONs,
> but SQLs UNION doesn't allow you to explicitly write
>     :x :y ?z { ?z :p ?q } UNION { ?z :r ?q }
> where the ?z-s are scoped to the whole expression and the ?q-s are
> scoped to the block. In relational the equivalent would be to join
> two expressions, each of two joins and use rho to unify the
> variables. But, I personally wouldn't write it that way.
>

So OUTER JOIN is a set operation not a join operation - so they are
differently scoped in SQL too (I think).

A good example (page 3):
http://www2.sas.com/proceedings/sugi31/242-31.pdf
Received on Tuesday, 5 June 2007 06:32:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:17:05 GMT