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

Re: INSERT/DELETE Update syntax

From: Ivan Mikhailov <imikhailov@openlinksw.com>
Date: Fri, 09 Oct 2009 04:09:08 +0700
To: Steve Harris <steve.harris@garlik.com>
Cc: "public-rdf-dawg@w3.org Group" <public-rdf-dawg@w3.org>
Message-Id: <1255036148.29228.1261.camel@octo.iv.dev.null>
Steve,

I like your idea, despite that we've implemented INSERT INTO <uri>
syntax already.

My reasons are
1) it makes construction templates more similar to patterns
2) Why not permit CONSTRUCT { GRAPH <uri> ... } then to make NQuads/TriG
at the output ? :)
3) With federation, it may become INSERT { SERVICE <endpoint-uri>
{ ... } } in a natural way
4) I can write INSERT { GRAPH `expression-for-iri` { ... }}

So I'd vote for support of both syntax variants.

In addition, I'd like to keep INSERT DATA for statements without WHERE
clause and probably without any expressions, static data only. This will
permit the use of very long INSERT DATA statements without the use of
the optimizing compiler (even without the complete parsing of the whole
statement before first triple is inserted)

Best Regards,
Ivan.

 and

On Thu, 2009-10-08 at 13:17 +0100, Steve Harris wrote:
> Reflecting on the update syntax I'm just wondering why the syntax  
> looks like:
> 
> INSERT DATA INTO <uri> {
>    ... some triples ...
> }
> 
> rather than:
> 
> INSERT {
>     GRAPH <uri> { ... some triples ... }
> }
> 
> which seems like a more obvious parallel to SPARQL 1.0, and allows  
> inserts to multiple graphs in a single insert block, with GRAPH you  
> would be able to write:
> 
> INSERT {
>     GRAPH <uri1> { <x> <y> ?a }
>     GRAPH <uri2> { <a> <b> ?b }
> }
> WHERE {
>     ?a <foo> ?b
> }
> 
> which would be less verbose than using the draft syntax, and arguably  
> easier to understand. c.f.
> 
> INSERT DATA INTO <uri1> {
>     <x> <y> ?a
> }
> WHERE {
>     ?a <foo> ?b
> }
> INSERT DATA INTO <uri2> {
>     <a> <b> ?b
> }
> WHERE {
>     ?a <foo> ?b
> }
> 
> - Steve
> 
Received on Thursday, 8 October 2009 21:10:01 GMT

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