W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2010

Re: Comments on SPARQL 1.1 Update (3)

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Thu, 02 Sep 2010 13:59:55 +0100
Message-ID: <4C7F9FCB.7000001@epimorphics.com>
To: Steve Harris <steve.harris@garlik.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>

On 02/09/10 10:06, Steve Harris wrote:
> On 2010-09-01, at 23:47, Andy Seaborne wrote:
>> [[
>> If an operation tries to insert into a graph that does not exist, then that graph *must* be created.
>> ]]
>> Surely this is wrong? For stores that distinguish empty graphs from non-existent graphs, we have CREATE GRAPH.  Automatic creation is at odds with that setup.
>> [[
>> Deleting triples that are not present, or from a graph that is not present will have no effect and will result in success.
>> ]]
>> seems inconsistent - why can't an error be generated for this case when stores do different graph existence from emptiness?
> I'm fairly sure we agreed that SPARQL Update implementations should be required to implicitly create graphs at a F2F. 4store had to do this, and it wasn't too much of an implementation burden, just test for existence before asserting the first triple in each graph.
> Consider:
>     GRAPH ?s {
>       ?s ?p ?o
>     }
> }
>     ?s a<Thing>  .
>     ?s ?p ?o .
> }
> Without this requirement, updates like the above can't be guaranteed to work across all stores, which would be unfortunate.

4Store is pure quads store with no special graph management IIRC so the 
situation makes sense.  As to implementation burden, then it falls out 
naturally in a quad table with no explicit test needed (and CREATE GRAPH 
is a no-op anyway isn't it?)

The text is slanted to one style of system.  What about a store that 
just manages a single graph, as the default graph?  As written, it 
*must* create a graph.  That seems a huge burden.  But I'd hope a system 
allowing update to one graph was could be considered conformant.

(A store that wishes to separate out graph management operations from 
data manipulation operations also seem reasonable to me but less common.)

Use of MAY would be better language (I assume that the same applies for 
INSERT DATA) and also, given the text though, what about

   INSERT { GRAPH <g> { } } WHERE {}
   INSERT { GRAPH <g> { ?s ?p ?o} } WHERE {}  # Skip unbound

These are trying to insert data.  MAY seems to allow free interpretation 
of these.  SHOULD is possible but I prefer the more neutral MAY here. 
Not sure what to say about the empty quads cases.

Tests are going to have to be clear as to requirements of a store. 
Maybe we need to separate the test suites into two bundles, one for 
single graph, one for named graphs.

Received on Thursday, 2 September 2010 13:00:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:01 UTC