Date: 2012-09-18 09:37:20
From: jeni@jenitennison.com
Hi,
I'm hoping someone here can help me with the following behaviour in OWLIM that seems odd. I can't work out whether it's a bug in the query or in OWLIM. 
First, set up a couple of triples:
BASE <http://example.org/>
INSERT DATA {
GRAPH <graph> {
<a> <p> <b> .
<c> <p> <d> .
}
}
Then try to delete everything about <a> and everything about things related to it through <p> (ie about <b>, though note there are no triples about <b>):
BASE <http://example.org/>
DELETE {
<a> ?p1 ?o1 .
?b ?p2 ?o2 .
} WHERE {
<a> ?p1 ?o1 .
OPTIONAL {
<a> <p> ?b .
?b ?p2 ?o2 .
}
}
When I run this update against this data, everything in the triplestore gets deleted. Is this expected behaviour?
Thanks,
Jeni
--

asked 03 Apr '13, 10:58

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%


Date: 2012-09-18 14:22:07
From: damyan@sirma.bg
Hi Jerven,
you are right.
looking further - it seems that it was an issue with the Sesame 2.6.6 - 
http://www.openrdf.org/issues/browse/SES-1047
and luckily,  it has been resolved in 2.6.7.
just checked the current behavior using Jeni's queries on owlim-se 
5.2.+sesame 2.6.8 and it works right, according to the cited working 
draft - e.g. does not clear repository contents.
So to Jeni - I recommend either upgrading to Sesame 2.6.7 or get/request 
a new Owlim build that is bundled with Sesame 2.6.8, since there were 
small API changes to Sesame 2.6.8 that makes it incompatible with the 
older Owlim releases.
Regards,
Damyan Ognyanov
Ontotext AD
link

answered 03 Apr '13, 10:59

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%

Date: 2012-09-18 12:09:20
From: damyan@sirma.bg
Hi,
looks to me as 'expected behavior' - it is the OPTIONAL statement that 
cause it - since it is not mandatory to produce a solution from the main 
block of the query, you'll end up with no bindings for ?b ?p2 and ?o2 in 
the projection so, then the DELETE part of the query will threat the 
missing bindings as wildcards to issue individual 'remove' operations 
for each such solution ...
HTH,
Damyan
link

answered 03 Apr '13, 10:59

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%

Date: 2012-09-18 12:33:23
From: jerven.bolleman@isb-sib.ch
Hi Damyan,
Hmm, this looks odd to me because in the CONSTRUCT case
the triple pattern with unbound values does not get generated.
i.e.
CONSTRUCT { ?a ?p ?o} where {?s ?p ?o}
produces no new triples
So I would expect
DELETE DATA { ?a ?p ?o} where {?s ?p ?o}
to not delete any triples.
There is also a part in the sparql update 1.1. current last working 
draft which supports this belief.[1]
"If any solution produces a triple containing an unbound  variable or an 
illegal RDF construct, such as a literal in a subject or predicate 
position, then that triple is not included in the output RDF graph."
This language was not in the May 2011 draft.
Regards,
Jerven
[1] http://www.w3.org/TR/sparql11-update/#deleteInsert
link

answered 03 Apr '13, 10:59

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×261
×242
×37

Asked: 03 Apr '13, 10:58

Seen: 1,779 times

Last updated: 03 Apr '13, 10:59

powered by BitNami OSQA