W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2004

Re: OUTER JOIN and DISJUNCTION

From: Simon Raboczi <raboczi@tucanatech.com>
Date: Tue, 16 Nov 2004 00:42:39 +1000
Message-Id: <99214078-3714-11D9-889A-000A95C5686E@tucanatech.com>
Cc: public-rdf-dawg@w3.org
To: Eric Prud'hommeaux <eric@w3.org>


On 15/11/2004, at 20:50, Eric Prud'hommeaux wrote:

>
> Related to
>   ACTION SimonR: explain how much of disjuction can be done with
>   optionals, nested or otherwise.  Point to references, problems with
>   LEFT OUTER JOIN in the literature.
>
> In my experiments, I haven't found DISJUNCTION that I couldn't
> implement with OUTER JOINs.

I haven't quite gotten the trick yet, embarrassingly enough.  Can you 
demonstrate for the simplest case of

SELECT ?a ?b WHERE (?a <x:p1> <x:o1>) UNION (?b <x:p2> <x:o2>)

targeting a graph with the following triples

<x:s1> <x:p1> <x:o1> .
<x:s2> <x:p2> <x:o2> .

I'd expect the result

+--------+--------+
|   ?a   |   ?b   |
+--------+--------+
| <x:s1> |        |
|        | <x:s2> |
+--------+--------+

What's the equivalent SPARQL using [ ] instead of UNION?
Received on Monday, 15 November 2004 14:50:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:21 GMT