Re: Comments on SPARQL 1.1 Update (3)

On 02/09/10 01:14, Sandro Hawke wrote:
> On Wed, 2010-09-01 at 23:47 +0100, Andy Seaborne wrote:
>> 4.1.3 DELETE/INSERT
>>
>> [[
>> 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.
>
> What's the guidance for users who want to write code which works on
> either kind of end-point?   Is it always possible to write in a
> conservative way which will work on either kind of store?  Or do users
> need to detect which kind of server they are talking to and have
> branches in their code?   If it is possible to avoid branches, can we
> document that style as best practice?

My partial answer: graphs can be created beforehand with

CREATE SILENT GRAPH <g>

It's only partial because you can't create a graph by variable that way 
but then you can't load data into a graph by variable either:

LOAD ?file INTO ?graph WHERE { ... }

DROP GRAPH ?g WHERE { ... }

> (I guess we already made this decision, at the moment to me it seems
> like a good place to flip a coin and make one kind of end-point go
> through the work to emulate the other kind.)

There are other cases as well: how about a graph store that contains a 
fixed set of updateable graphs.  An important degenerate case being 
having one graph the default graph and no named graphs, but also a fixed 
set of named graphs (one per person in a department).  As it stands, 
such a store is not conforming to the spec.

 Andy

Received on Thursday, 2 September 2010 07:44:40 UTC