W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2011

SPARQL update semantics Dataset-UNION vs. Dataset-MERGE

From: Axel Polleres <axel.polleres@deri.org>
Date: Mon, 18 Apr 2011 00:13:24 +0100
Message-Id: <E1C93B9D-B4C2-496C-99CD-9BE8AA13430B@deri.org>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
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.


     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 

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


   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.

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:04 UTC