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

Re: test cases for fromUnionQuery, please

From: Eric Prud'hommeaux <eric@w3.org>
Date: Thu, 2 Jun 2005 01:48:58 -0400
To: Yoshio FUKUSHIGE <fuku@w3.org>
Cc: RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-ID: <20050602054858.GB4845@w3.org>
On Wed, Jun 01, 2005 at 08:27:32PM +0900, Yoshio FUKUSHIGE wrote:
> 
> 
> Hi,
> 
> Dan:
> 
> >For each of these options, and any other designs anybody wants
> >the WG to consider, would you please send a test case that
> >distinguishes it from the design in the editor's draft?
> >Bonus points for suggesting textual changes.
> 
> > (3) ala Yoshio, no implicit dataset; all data to be queried
> > is specified in the query
> 
> >For (3), we one degenerate test case that distinguishes it
> >from rq23 is the 1st example in the spec:
> >
> >SELECT ?title
> >WHERE  { <http://example.org/book/book1>
> ><http://purl.org/dc/elements/1.1/title> ?title }
> >
> >that becomes illegal. Some specification of the data
> >to query is required; so the "hello world" example
> >would change to semething like:
> >
> >SELECT ?title FROM <books.rdf> WHERE { ?book dc:title ?title }.
> >
> >That seems like a significant change in direction, so
> >I'd like to see explicit support from several WG members
> >before we explore it further.
> >
> >Other things that become illegal in this design are answers
> >that come from beyond the graphs given in the query. I doubt
> >that can be expressed in our current test harness, but I suppose
> >we could figure out some way to do it.
> 
> Hmm, I don't see it significant change.
> It's a design preference (EricP showed me in personal communication
> that using (1) or (2), we can still do the same thing as (3),
> but the query gets quite complicated).
> It's a simplification.
> (putting aside (0), it's the simliest one, I admit, but weaker)

Recording Yoshio and my whiteboard discussion here:

Given this data:
  <c>:
	<A> knows <B>

  <d>:
	<B> mbox <mailto:b>

It seems the following 4 expressions are all equivilent:

(1) (Named Graphs (arbitrary pre-existing data)):
  FROM <c> <d>
  WHERE {
	GRAPH ?g { ?who knows ?whom } .
	GRAPH ?g { ?whom mbox ?mbox } .
	FILTER ?g = <c> || ?g = <d>

(2) (Source (arbitrary pre-existing data)):
  FROM <c> <d>
  WHERE {
	SOURCE ?g { ?who knows ?whom } .
	SOURCE ?g { ?whom mbox ?mbox } .
	FILTER ?g = <c> || ?g = <d>

(3) (No Default Graph): 
  FROM <c> <d>
  WHERE {
	?who knows ?whom .
	?whom mbox ?mbox } }

(?) (Source + CLEAR (arbitrary pre-existing data)):
  CLEAR
  FROM <c> <d>
  WHERE {
	?who knows ?whom .
	?whom mbox ?mbox } }

It is also possible to compile (3) into (1) or (2).

> Well, you don't have to be precise/complete when you don't care
> what data the service use.
> 
> You can put the URI of the endpoint there in those cases, like
> ---
> FROM <http://sparql.example.org/> # meant to have single <>'s
> SELECT ...
> WHERE {...}
> ---
> where the URI of the endpoint of the service is http://sparql.example.org/
> 
> And the service may well use any inference or consulting any databases
> (it's delegated)
> 
> This design is also useful especially when queries are handled by an 
> intermediate
> server, as Pat mentioned yesterday.
> 
> Query issuer (=end user) doesn't have to care about the protocol, he/she 
> can let the system care.
> Intermediator can delegate to some other service(s) safely, while keeping 
> the query unchanged.
> 
> 
> OK, test case, anyway
> 
> PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
> FROM <http://db1.example.org/>
> SELECT ?m
> WHERE {<http://example.org/People/Yoshio> foaf:mbox ?m}
> 
> Suppose this query is handled to SPARQL service A, whose endpoint URL is 
> http://sparql.example.org/,
> and A has access to some RDF databases identified by 
> http://db1.example.org/ (db1), and http://db2.example.org (db2).
> 
> Suppose further that db1 has
> <http://example.org/People/Yoshio> foaf:mbox <mailto:yoshio@example.org>.
> 
> and db2 has
> <http://example.org/People/Yoshio> foaf:mbox <mailto:tonto@example.org>.
> 
> 
> With option (3), only <mailto:yoshio@example.org> will be bound,
> while in (1) or (2), when db2 is already in the default database,
> <mailtp:tonto@example.org> will also be bound to ?m.
> 
> # And I don't want to be known my secret, i.e. being  "tonto" : )
> 
> I hope it will do as a test case.
> 
> Best,
> Yoshio
> fukushige.yoshio@jp.panasonic.com
> fuku@w3.org
> 

-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Thursday, 2 June 2005 05:49:02 GMT

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