Re: DELETE and blank nodes

On 2010-3-3 16:40 , Andy Seaborne wrote:
> 
> 
> On 03/03/2010 3:32 PM, Birte Glimm wrote:
>> Thanks a lot Lee for the great summary!
>>
>> On 3 March 2010 06:16, Lee Feigenbaum<lee@thefigtrees.net>  wrote:
>>
>> [snip]
>>
>>> >  == The Proposals ==
>>> >
>>> >  I see only two realistic proposals emerging from this.
>>> >
>>> >  1/ We prohibit blank nodes in the DELETE template completely.
>> This might work nicely for simple entailment, but will not work for
>> OWL (maybe RIF too). E.g., if I have a statement that Peter has some
>> parent who's a Lawyer, I can say that in OWL functional-style syntax
>> with:
>> ClassAssertion(ObjectSomeValuesFrom(ex:hasParent ex:Lawyer) ex:Peter)
>> For this, the (normative) mapping to triples gives:
>> ex:Peter a _:x.
>> _:x a owl:restriction .
>> _:x owl:onProperty ex:hasParent .
>> _:x owl:someValuesFrom ex:Person .
> 
> ex:Lawyer?
> 
>> for a fresh bnode _:x. There is no way to represent this OWL statement
>> without bnodes, but it is always possible to use a square bracker
>> form.
> 
> I think Lee is referring to syntactic use of bnodes in a delete
> template, not bnodes that might be found by a query pattern and bound to
> a variable. So _:x is a new bnode not the bnode with that label in the
> data.
> 
> It would be deleted by:
> 
> DELETE WHERE
> {
>   ex:Peter a ?var.
>   ?var a owl:restriction .
>   ?var owl:onProperty ex:hasParent .
>   ?var owl:someValuesFrom ex:Lawyer .   
> }
> 
> using variables with ?var binding to exactly the bnode that was
> syntactical _:x in the data.

Yes, but... the reason against alternative (2), at least in Lee's
description, is not technical but more didactic. On the other hand,
explaining to somebody who wants to manipulate an OWL graph via SPARQL
that instead of writing

DELETE WHERE {
   ex:Peter a [ a owl:Restriction; owl:onProperty ex:hasParent;
                owl:someValuesFrom ex:Lawyer ]
}

he/she has to replace the blank node by a variable is fairly unnatural.
Let alone the fact that hard core OWL users (like Birte:-) will use
another syntax and convert it to turtle automatically...

Also, if one has a DELETE { t1 } WHERE { t2 } with t1 <> t2, and t1
manipulates a knowledge base, then the situation becomes even more
complicated and the trick of variables may not work any more...

Obviously, the issue is whether manipulating OWL and RIF knowledge bases
via SPARQL is a good enough use case. I think that it is, but opinions
may differ on that one.

Ivan


> 
>     Andy
> 
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF   : http://www.ivan-herman.net/foaf.rdf
vCard  : http://www.ivan-herman.net/HermanIvan.vcf

Received on Wednesday, 3 March 2010 16:07:48 UTC