W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > September 2011

SPARQL Update - Clarifying correct behavior when a graph is created implicitly

From: David Booth <david@dbooth.org>
Date: Tue, 13 Sep 2011 18:40:57 -0400
To: public-rdf-dawg-comments <public-rdf-dawg-comments@w3.org>
Cc: eric neumann <eneumann@pangenx.com>, Ian Emmons <iemmons@bbn.com>
Message-ID: <1315953657.2882.67424.camel@dbooth-laptop>
The SPARQL Update spec indicates that "If data is inserted into a graph
that does not exist in the graph store, it *should* be created":
http://www.w3.org/TR/sparql11-update/#insertData
However, I've run into an issue with one implementation (Parliament
2.7.1) in which the graph *is* created automatically in such
circumstances, but the graph is not persisted in the store unless it was
created explicitly using a CREATE operation.  

For example, the following query creates the named graph whether line 3
is commented out or not:

  PREFIX test: <http://example/test/>
  DROP SILENT GRAPH test: ;
  CREATE SILENT GRAPH test: ;   # Line 3
  INSERT DATA
  {
    GRAPH test: { test:foo a test:bar }
  }

But if line 3 is commented out, then the graph is not persisted.

I consider this a bug (and I assume the Parliament implementers will
also, though I have not heard back from them yet) because it would lead
to substantial compatibility issues for SPARQL update queries if some
implementations persisted the graph and others did not.  But AFAICT, the
SPARQL Update spec does not make clear that this behavior is wrong.

Therefore, I suggest adding some clarification to this effect at the end
of the first paragraph in section 3.1:
http://www.w3.org/TR/sparql11-update/#graphUpdate 
[[
If a graph is created implicitly by an update operation, then the
behavior of the Graph Store MUST be functionally equivalent to its
behavior if the graph had been created explicitly by a CREATE operation.
]]

Thanks!


-- 
David Booth, Ph.D.
http://dbooth.org/

Opinions expressed herein are those of the author and do not necessarily
reflect those of his employer.
Received on Tuesday, 13 September 2011 22:41:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 13 September 2011 22:41:24 GMT