W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2009

Re: [ISSUE-8] subqueries and datasets

From: Steve Harris <steve.harris@garlik.com>
Date: Fri, 8 May 2009 11:34:52 +0100
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <DB2372E9-3A62-41B7-8141-8E8E3B2180B0@garlik.com>
To: Lee Feigenbaum <lee@thefigtrees.net>
On 8 May 2009, at 05:40, Lee Feigenbaum wrote:
> It seems to me that ARQ's behavior is simple and avoids this  
> problem, but I'm not sure at what cost. My natural inclination is  
> that its valuable for queries & their subqueries to be able to  
> target different graphs.
> Current recommendation? Unsure.
> Suggested next steps? Determine whether we have reasonable use cases  
> to require that subqueries can target different datastes from parent  
> queries.

Good summary.

For the record, I think it makes most sense to ban FROM in subqueries.

The specification of FROM is a little unclear in my mind, but by my  
understanding it should be possible to rewrite any sub-FROM'd query  
using GRAPH, eg. if you want to ask something like:

FROM <a>
   ?x a :Person .
     FROM <b>
     SELECT ?x, ?z WHERE {
       ?x :knows ?z

you could also write something like:

FROM <a>, <b>
   GRAPH <a> { ?x a :Person }
     SELECT ?x, ?z WHERE {
       GRAPH <b> { ?x :knows ?z }

Possibly you need to use FROM NAMED, not FROM.

- Steve

Steve Harris
Garlik Limited, 2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10  
Received on Friday, 8 May 2009 10:35:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:54 UTC