Review of Update

Hi,

Here is my review of SPARQL 1.1 Update (action 555)
http://www.w3.org/2009/sparql/docs/update-1.1/
version of 2011-11-08

Best regards,

Olivier

_________________



W3C Working Draft 12 May 2011
-> To be changed

The end date of the Last Call review period is 29 July 2011.
-> To be changed


2 The Graph Store

Unless overridden (for instance, by the SPARQL protocol), **then** the 
unnamed graph for the store will be the default graph for any operations 
on that store.
->
Unless overridden (for instance, by the SPARQL protocol), the unnamed 
graph for the store will be the default graph for any operations on that 
store.

(remove "then")


-- Comment: graph store should be written Graph Store in a consistent way.


In the simple case, where there is one unnamed graph
->
In the simple case where there is one unnamed graph

(remove ",")


3.1 Graph Update

The INSERT DATA operation adds some triples, given inline in the 
request, into a graph. This will create the destination graph if it does 
not exist.
->
The INSERT DATA operation adds some triples, given inline in the 
request, into a graph. This **should** create the destination graph if 
it does not exist.


3.1.2 DELETE DATA


QuadDatas that contains variables or blank nodes is disallowed
->
QuadData that contains variables or blank nodes is disallowed


Blank nodes are not permitted in the QuadData, as these cannot match any 
existing data.
->
Blank nodes are not permitted in the QuadData, as these **do not** match 
any existing data.


Example 3: Removing undesired triples from a graph
->
Example 3: Removing triples from a graph


Example 4:

The query replaces an occurrence of "Desing" by "Design" but the Data 
before does not contain an occurrence of "Desing". So the example is 
misleading (although not false).


3.1.3 DELETE/INSERT


The bindings for each solution are then substituted into the DELETE 
template to remove triples, and then in the INSERT template to create 
new triples.

-> Explain what happens if a variable in the template has no value in a 
solution: this is processed as in construct-where ...

If no data is to be inserted, then no graph will be created, even if 
applying the operation to a different dataset would result in data being 
inserted.

-> This sentence is not clear.



-- Question:

INSERT WHERE: what happens if INSERT has two graph patterns that insert 
the same blank node in two different graphs:

INSERT {
graph <g1> {?x ?p ?v}
graph <g2> {?x ?p ?v}
}
WHERE {
?x ?p ?v filter (isBlank(?v))
}


Example 11:

This example request removes both statements naming some resource "Fred" 
in the graph http://example.com/names, and also statements about that 
resource from the graph http://example/addresses (assuming that **any 
subject** in the graph http://example.com/names has corresponding 
triples in the graph http://example/addresses).

->

This example request removes both statements naming some resource "Fred" 
in the graph http://example.com/names, and also statements about that 
resource from the graph http://example/addresses (assuming that **some 
of these resources** in the graph http://example.com/names have 
corresponding triples in the graph http://example/addresses).


Example 11:
Data after:

# Graph: http://example.com/names

This triple should be removed:

<http://example/fred> foaf:givenName "Fred" .




3.1.4 LOAD

The load operation is designed for RDF 1.0 where there is no syntax for 
named graphs.
In the future, what will happen if the RDF document loaded from the URI 
contains named graph(s) ?
In this case, load may not modify the default graph, and it may conflict 
with the "into graph" clause.

Also, there is no indication of the format supported by LOAD: RDF/XML ? 
Turtle ? ...


Note:
For services which form the default graph from the unions of other 
graphs then CLEAR DEFAULT may have further implications which we leave 
unspecified here.

->

Note:
For services which form the default graph from the **union** of other 
graphs, CLEAR DEFAULT may have further implications which we leave 
unspecified here.

(and replace  "then" by ",")




3.2 Graph Management


support persistent empty named graphs

-> the term "persistent" is used nowhere else in the document, it is not 
defined.



3.2 Graph Management


# The ADD operation reproduces all data in one graph into another.
->

# The ADD operation reproduces all data **from** one graph into another.



3.2.3 COPY


Notation '' below is not clear:

( GRAPH IRIref_to | '')


Example 12:


Data before:

# Graph http://example.org/named

-> should be in bold font
-> prefix foaf: is missing


Note that the original content in http://example.org/named is lost by a 
COPY operation.
->
The "COPY" keyword is in capital with a size greater than other keywords 
in the doc.


3.2.4 MOVE


Notation '' below is not clear:

( GRAPH IRIref_to | '')



As for COPY, if the destination graph does not exist, it will be 
created. By default, the service is expected to return failure if the 
input graph does not exist.
->
"is expected" is ambiguous,
prefer the service should or must


Example 13:

Note that the original content in http://example.org/named is lost by a 
MOVE operation.
->
The "MOVE" keyword is in unusual king size capital.



3.2.5 ADD


Notation '' below is not clear:

( GRAPH IRIref_to | '')


By default, the service **is expected to** return failure
-> must or should


Example 14:

Data before:

# Graph http://example.org/named

-> sould be in bold



4 SPARQL Update Formal Model


Definition: Graph Store

each named slot is pair of a graph
->
each named slot is **a** pair of a graph



4.2 Auxiliary Definitions


The Dataset-MERGE definition is currently not needed, we might drop it 
in the final recommendation.

-> Drop this ?



4.2.1 Dataset-MERGE

Gj for iri = iri'j such that irij in graphNames(DS') \ graphNames(DS)

->

Gj for iri = iri'j such that iri'j in graphNames(DS') \ graphNames(DS)

(replace irij by iri'j)



4.2.2 Dataset-UNION
Definition: Dataset-UNION

The Dataset-UNION between DS and **Ds'** is defined as follows:
->
replace Ds' by DS'


# Gj for iri = iri'j such that **irij** in graphNames(DS') \ graphNames(DS)

->

replace irij by iri'j



4.2.4 Dataset( QuadPattern, mu, DS, GS )

Add something like:

We need to distinguish DS and GS  because, among others,  in case of  
USING [NAMED] clauses, DS and GS may differ.



Let mu be a solution mapping, DS={DG} union {(irii, Gi) | 1 <= i <= n} 
be and RDF Dataset and GS be the current state of the graph store.
->
Let mu be a solution mapping, DS={DG} union {(irii, Gi) | 1 <= i <= n} 
be **an** RDF Dataset and GS be the current state of the graph store.


valid RDF triples
-> Give a reference to define what is a valid RDF triple



4.2.5 Dataset( QuadPattern, P, DS, GS )


Dataset(QuadPattern, P, DS, GS ) =
Dataset-UNION( { Dataset(QuadPattern, mu) | mu in eval'(DS(DG),P) )

->

Dataset-UNION( { Dataset(QuadPattern, mu, **DS, DG**) | mu in 
eval'(DS(DG),P) **}** )




Data before:

# Default graph
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

_:b a foaf:Person .
:s  a foaf:Person .

prefix ":" is undefined




4.3.5 Clear Operation


and OpCleardef for clearing all graphs including the default graph.
->
and OpClear**all** for clearing all graphs including the default graph.




4.4.2 DropOperation

OpDropnamedfor dropping
->
OpDropnamed for dropping



4.5 Mapping Update Requests to the Formal Model


Table 1: Mapping from Update Requests to Update Operations

CLEAR (SILENT)? DEFAULT    OpCleardef(GS, IRIref)
CLEAR (SILENT)? NAMED    OpClearnamed(GS, IRIref)
CLEAR (SILENT)? ALL    OpClearall(GS, IRIref)

DROP (SILENT)? DEFAULT    OpDropdef(GS, IRIref)
DROP (SILENT)? NAMED    OpDropnamed(GS, IRIref)
DROP (SILENT)? ALL    OpDropall(GS, IRIref)


should be:


CLEAR (SILENT)? DEFAULT    OpCleardef(GS)
CLEAR (SILENT)? NAMED    OpClearnamed(GS)
CLEAR (SILENT)? ALL    OpClearall(GS)

DROP (SILENT)? DEFAULT    OpDropdef(GS)
DROP (SILENT)? NAMED    OpDropnamed(GS)
DROP (SILENT)? ALL    OpDropall(GS)



B Internet Media Type, File Extension and Macintosh File Type



sparql update
->
SPARQL Update

(twice)

Received on Monday, 14 November 2011 16:39:28 UTC