SPARQL update semantics Dataset-UNION vs. Dataset-MERGE

Hi all,

trying to catch up with my actions and especially with Update semantics... taking some closer look at Dataset-UNION vs. Dataset-MERGE,
since we now have a definition of Dataset-MERGE in query...

My overall impression is that we actually may want to switch to Dataset-MERGE  for all our definitions in SPARQL update as well... explained in the following: 

1) For the Insert Data Operation http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_insertdataoperation , it seems to me that we don't really 
   want to be reusing bnode labels (assuming that an agent inserting Data is not aware of the bnode lables in the graph store anyways.

   i.e.  

     INSERT DATA { _:a :p :o }
  
    should IMO insert a new bnode label, rather than using  _:a as the label to be inserted.


2) The Delete Insert Operation http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_deleteinsertoperation
   anyways relies on the Dataset() function (cf. http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_datasetPattern)
   which "skolemises" bnodes away. before ...

3) ... I think the Dataset() function of http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_datasetPattern can be changed actually 
   from

   Dataset(QuadPattern, P, GS ) = Dataset-UNION( sk-1( Dataset(QuadPattern, μ) ) | μ in eval(sk(GS)(sk(DG)),P) )

   to 

   Dataset(QuadPattern, P, GS ) = sk-1 (Dataset-MERGE( Dataset(QuadPattern, μ) ) | μ in eval(sk(GS)(sk(DG)),P) )

  without changing of meaning... (again, since bnodes have been skolemised away and are only re-introduced via the final sk-1)

4) In http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_loadoperation ... it is actually ok to use Dataset-MERGE, 
   since you don't want to reuse bnode-labels coming from an external Graph.

5) The use of Dataset-UNION() in http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_clearoperation can be changed to Dataset-MERGE without altering semantics.

6) The use of Dataset-UNION() in http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#def_createoperation can be changed to Dataset-MERGE without altering semantics.


these seem to be all uses of Dataset-UNION(), please let me know if I am missing something.

best,
Axel

Received on Sunday, 17 April 2011 23:13:54 UTC