Re: Non-PK tables, blank nodes, and leanness

David,

On 24 Apr 2012, at 19:54, David McNeil wrote:
>> On Tue, Apr 24, 2012 at 1:44 PM, Richard Cyganiak <richard@cyganiak.de> wrote:
>>   _:1 <IOU#BORROWER> "Alice".
>>   _:1 <IOU#AMOUNT> 10.
>>   _:2 <IOU#BORROWER> "Alice".
>>   _:2 <IOU#AMOUNT> 10.
>> 
>> As Juan observed during the call, this graph is non-lean. RDF Semantics tells us: “Non-lean graphs have internal redundancy and express the same content as their lean subgraphs.” [1] In other words, the graph above is semantically equivalent to this one:
>> 
>>   _:1 <IOU#BORROWER> "Alice".
>>   _:1 <IOU#AMOUNT> 10.
> 
> Richard - I may be wrong, but that is not my understanding of leanness. Furthermore I don't think the two graphs you listed above are semantically equivalent.

I'm afraid you're mistaken here.

The classical example for leanness is this:

   :Bob :hasChild _:1.

What does this graph tell us? “Bob is in a hasChild relationship to some entity.” In other word, there exists something that is a child of Bob. Now consider this:

   :Bob :hasChild _:1.
   :Bob :hasChild _:2.

What does this graph tell us? “Something that is a child of Bob exists. Something that is a child of Bob exists.” It just tells us the same thing twice. It is redundant, and thus equivalent to the first graph. The first graph is lean, the second isn't.

Keep in mind that blank nodes are existential variables. So basically this is no different from a SPARQL query:

   :Bob :hasChild ?x.
   :Bob :hasChild ?y.

This will be matched by a “world” in which Bob has just a single child, with ?x and ?y bound to the same value. The fact that the variables are named differently doesn't mean that they need to be bound to different entities.

The IOU example above is just a slightly more complex variation on that.

(Note that semantically equivalent graphs can produce different SPARQL results. But that's sort of obvious – if you materialize implicit triples, then you're not changing the semantics of the graph, but you potentially change the query results. Different structure, same semantics.)

Best,
Richard

Received on Tuesday, 24 April 2012 20:15:24 UTC