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

Re 2: [TF-ENT] Querying datasets with default plus named graphs

From: Ivan Herman <ivan@w3.org>
Date: Mon, 12 Oct 2009 14:12:12 +0200
Message-ID: <4AD31D1C.4010305@w3.org>
To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
Just thinking a bit further...

Ivan Herman wrote:
> 
> Birte Glimm wrote:
>> [snip]
>>> Just for my understanding, based on your latest text (thanks for having
>>> added it, b.t.w.!)... if I have
>>>
>>> <A> standing for the graph
>>> :p rdfs:range :AA
>>>
>>> <B> standing for the graph
>>> :p rdfs:domain :BB
>>>
>>> <C> standing for the graph
>>> :x :p :y
>>>
>>> then the query:
>>>
>>> SELECT ?g
>>> FROM NAMED <A>
>>> FROM NAMED <B>
>>> FROM <C>
>>> WHERE {
>>>   GRAPH ?g { :y a ?type }
>>> }
>>>
>>> will return ?g-><A>, right?
>> I would not say so. In this query you have not merged that data from
>> the three graphs that you consider. Your query will go through all
>> three graphs (the 2 named and the default graph) and try to find a
>> binding for the variables in each graph without considering the data
>> from the other graphs. I.e., you can first try ?g-><A>, but <A> alone
>> does not provide a binding for ?type and entailment cannot do much if
>> you have only the triple :p rdfs:range :AA. Then you go on to ?g-><B>,
>> but again, the triples from <B> alone do not give a binding for ?type.
>> Now you try the default graph, but that alone does also not give any
>> type information and there is no answer for the query.
>>
> 

This may not be a problem, but I must add that if this is what we mean
than this means RDFS reasoning on named graphs fairly difficult to use.
What this means that a specific named graphs should always include both
the vocabulary part _and_ the data itself (this is where the missing
import mechanism backfires). Indeed, for the default graph, I can have
as many FROM statements as I want, some of those getting hold of the
vocabulary and others of the data, this is not a possibility for a named
graph... Or do I miss something again?

As I said, we may want to live with this, but it is worth noting to
ourselves...

Ivan

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 12 October 2009 12:12:42 GMT

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