Re: SPARQL Protocol for RDF

Patrick Stickler wrote:
> 
> On Jun 2, 2005, at 17:01, ext Kendall Clark wrote:
> 
>>>- ok, I have doubts about this, and it's appearance in the 
>>>latestdraft -
>>>default-graph-uri - shouldn't the default graph be 
>>>somethingdetermined in
>>>the scope of the query engine? If it does need to benamed, shouldn't 
>>>that go
>>>in the query itself?
>>
>>The design we've come up with allows the RDF dataset (which is 
>>composed of
>>zero or one default (sometimes called "background") graph and zero or 
>>more
>>named graphs) to be specified either in the protocol, or in the query
>>language, or in both. In the case where it is specified in both, but 
>>the RDF
>>datasets are not identical, the dataset specified in the protocol 
>>trumps the
>>one specified in the query.
> 
> 
> Why is it necessary/beneficial to be able to specify any graphs
> in the protocol? Why isn't the query sufficient?  A use case and
> some rationale would help understand the (presumed) requirement
> for this feature.

A query can apply to many datasets so the dataset would not be described in the 
query string.  Think of a library of queries or an agent that has the query in it:

PREFIX  foaf:   <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name }

It wants to use this query on several different services.  As one service can 
offer different datasets, or be a service that grabs graphs from the web and 
makes them available, the actualt request has to have the dataset description in.

We could require the agent rewrite the query string (queries are request 
templates - they can be reused) but we kept a separation so that a query can be 
applied to a different datatset by the protocol alone.


You can have queries that can be used on many different datasets - a query agent 
may uses the same at difefrent services.  Therefore, the protocol has to provide 
the dataset description if it is not in the query.

Conversely, sometimes queries are used locally, no SPARQL protocol so it is 
convenient to put the dataset description in the query.

We then need to say what happens if both occur.  We decided that the protocol 
overrides the query description, enabling a query to be reused elsewhere.

	Andy

> 
> 
>>This is spelled out in the latest draft thus:
>>
>>  The RDF dataset may be specified either in a legal [SPARQL] query 
>>using
>>  FROM and FROM NAMED keywords; or it may be specified in the protocol
>>  described in this document; or it may be specified in both the query
>>  proper and in the protocol. In the case where both the query and the
>>  protocol specify an RDF dataset, but not the identical RDF dataset, 
>>the
>>  dataset specified in the protocol must be the RDF dataset consumed by
>>  SparqlQuery's query operation.
>>
>>Since both you and Patrick asked about this, this bit must either be 
>>vague
>>or just doesn't stand out enough in the draft presently. I'll think 
>>about
>>ways to make it more difficult to miss. :>
> 
> 
> Some use cases which clearly illustrate the requirement for the
> feature in the protocol would be very valuable.
> 
> Cheers,
> 
> Patrick
> 
> 

Received on Monday, 6 June 2005 11:54:14 UTC