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

RE: INSERT/DELETE Update syntax

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Fri, 9 Oct 2009 17:14:53 +0000
To: Steve Harris <steve.harris@garlik.com>
CC: "public-rdf-dawg@w3.org Group" <public-rdf-dawg@w3.org>
Message-ID: <B6CF1054FDC8B845BF93A6645D19BEA3693EDB3C91@GVW1118EXC.americas.hpqcorp.net>


> -----Original Message-----
> From: Steve Harris [mailto:steve.harris@garlik.com]
> Sent: 09 October 2009 17:35
> To: Seaborne, Andy
> Cc: public-rdf-dawg@w3.org Group
> Subject: Re: INSERT/DELETE Update syntax
> 
> On 9 Oct 2009, at 16:46, Seaborne, Andy wrote:
> 
 [snip]


> >> INSERT {
> >>    GRAPH <uri1> { <x> <y> ?a }
> >>    GRAPH <uri2> { <a> <b> ?b }
> >> }
> >> WHERE {
> >>    ?a <foo> ?b
> >> }
> >
> > If ?a is a bnode, what happens? :-)
> 
> An obvious option is the same rules as per CONSTRUCT. { ?a <foo> ?b }
> can only match triples from the default graph. I don't remember if
> SPARQL says that it's legal for bNodes to exist in more than one
> graph. 

I don't think RDF says whether bNodes can exist across graphs.  It doesn't say anything across graphs.

> 4store typically treats the default graph as the union of the
> named graphs, but I've never been quite convinced that that is legal
> per the spec.

?? I thought we'd agreed it was.  Several systems do it.  And IIRC the spec was specifically worded to allow it, as well as when it's not a union.

I was wondering what your proposal was for the 
"GRAPH <uri1> { <x> <y> ?a }" part.

> 
> The slightly trickier case is:
> 
> INSERT {
>     GRAPH <uri1> { <x> <y> ?a }
>     GRAPH <uri2> { <a> <b> ?b }
> }
> WHERE {
>     GRAPH <uri1> { ?a <foo> ?b }
> }
> 
> > I suggest that both renaming bnode labels, and choosing not to, are
> > legal.
> 
> Hm, I'm not sure about that. It depends whether INSERT is defined as a
> merge, or a union.

Don’t quite follow.  A graph is a set of triples.

> 
> Are you proposing leaving it up to the query processor?

Whether it is the same bNode (label) in graph <uri1> and default graph?  Yes. 

Useful if the bNode (label) is already in graph <uri1> because different INSERT or DELETE operations in the same request can update the same bNode resource.

> >> INSERT {
> >>    GRAPH <uri1> { <x> <y> ?a }
> >>    GRAPH <uri2> { <a> <b> ?b }
> >> }
> >> WHERE {
> >>    ?a <foo> ?b
> >> }
> 
> - Steve

	Andy

Received on Friday, 9 October 2009 17:15:29 GMT

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