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

RE: Review of SPARQL Update submisson (ACTION-53)

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 21 Jul 2009 20:32:32 +0000
To: Luke Wilson-Mawer <luke.wilson-mawer@garlik.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
Message-ID: <B6CF1054FDC8B845BF93A6645D19BEA3646FE75D37@GVW1118EXC.americas.hpqcorp.net>


> -----Original Message-----
> From: public-rdf-dawg-request@w3.org [mailto:public-rdf-dawg-request@w3.org]
> On Behalf Of Luke Wilson-Mawer
> Sent: 20 July 2009 15:46
> To: SPARQL Working Group
> Subject: Review of SPARQL Update submisson (ACTION-53)
> 
> Hi,
> 
> Here are my comments on the UPDATE submission, they aren't independent
> since Steve's name is on the submission for Garlik, but hopefully
> they're useful nonetheless
> 
> http://www.w3.org/Submission/2008/SUBM-SPARQL-Update-20080715/

> 
> 1) INSERT DATA/UPDATE DATA.
> Streaming of large chunks of data seems like something the protocol
> ought to do - it seems to me more natural to squirt a whole file over
> the wire than to turn the data into a query.  The LOAD <remoteURI>
> feature would also seem like a natural way to do this, possibly extended
> to load local files, although I'm not sure about the security consequnces.
> 

In SPARQL/Update a request can be several operations so having the data inline 

Having INSERT DATA makes it possible to a collect several operations together into one request (and one file, not necessarily vital but useful).

We could call the operation "PUT" to be similar to the protocol.

LOAD <remoteURI> assumes you have somewhere to pull it from.


> 2) It doesn't seem clear whether a WHERE clause and FILTERS can be used
> with these verbs:
> CREATE
> DROP
> CLEAR
> LOAD

[11] 'LOAD' IRIref+ ( 'INTO' IRIref )?
etc

No WhereClause (which is the pattern)

The grammar was written to maximise reuse from the SPARQL grammar 

(FYI: Currently, I use a single grammar for query and update with two entry points.  This keeps the patterns parts, which is the majority of the rules, in step.  But other parser tools may have problems with this).

> 
> 3) Do we really need the MODIFY verb?  It seems to be syntactic sugar,
> as we can always use either DELETE FROM <uri> or INSERT INTO <uri> to
> specify a graph.  It isn't used in any of the examples but it's
> mentioned elsewhere.  The only thing it seems to do is stop the user
> having to type a graph name more than once if multiple operations are
> done on the same graph in the same query.

Just to note that in MODIFY, the DELETE and the INSERT are driven by the same WHERE clause, and this is executed before either DELETE or INSERT change the target.

	Andy

> 4) I agree with Alex Passant that Example 2e would be simplified by
> introducing a MOVE verb.  Still, this example requires the full syntax:
> 
> The bookStore2 graph is created and only a year's worth of books are kept :
> 
>     PREFIX dc:  <http://purl.org/dc/elements/1.1/>
>     PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> 
>     INSERT INTO <http://example/bookStore2>
>      { ?book ?p ?v }
>     WHERE
>       { GRAPH  <http://example/bookStore>
>          { ?book dc:date ?date .
>            FILTER ( ?date < "2000-01-01T00:00:00"^^xsd:dateTime && ?date
>      > "1999-01-01T00:00:00"^^xsd:dateTime)
>            ?book ?p ?v
>          }
>       }
> 
>     DELETE FROM <http://example/bookStore>
>      { ?book ?p ?v }
>     WHERE
>       { GRAPH  <http://example/bookStore>
>           { ?book dc:date ?date .
>             FILTER ( ?date < "2000-01-01T00:00:00"^^xsd:dateTime )
>             ?book ?p ?v
>           }
>       }
> 
> 
> Thanks,
> 
> Luke
> 
> 
> 
> 
> 
> 
> 

Received on Tuesday, 21 July 2009 20:33:50 GMT

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