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

```On 25 Apr 2012, at 00:01, Juan Sequeda wrote:

> In other words, SPARQL may give different (but equivalent) answers to equivalent graphs.
>
> I disagree. If you compute the core (the result of removing redundant blank nodes aka lean rdf graph),  you get same answers. But if you dont compute it, you get different answers.
>
> For example:
>
> ?x <IOU#BORROWER> "Alice".
>   ?x <IOU#AMOUNT> 10.
>  ?y <IOU#BORROWER> "Alice".
>   ?y <IOU#AMOUNT> 10.
> FILTER (?x != ?y)
> }
>
> Will return true on a non lean rdf graph (per the example below) and would return false on a lean rdf graph.

Interesting. Are you sure? If this is true, I completely missed this aspect of SPARQL: logically speaking, inequality should NOT succeed when ?x and ?y are bound to distinct bnodes, since you can not actually prove that they map to distinct individuals.
Anyway, what happens in SPARQL is that a BGP (for which the property I stated above holds for sure) is evaluated against the data, and the result of this evaluation is subsequently consumed by the SPARQL algebra. The algebra contains quite cumbersome aspects, and it treats (erroneously) bnodes mainly as constants.

cheers
--e.

>
> on the le
>
> Check out my PODS-2006 invited talk slides at
> <http://www.inf.unibz.it/~franconi/papers/franconi-slides-pods-2006.pdf>.
> cheers
> --e.
>
> On 24 Apr 2012, at 22:13, Juan Sequeda wrote:
>
>> This is a non lean RDF graph and per the RDF semantics, they are equivalent.
>>
>> Gotta love the RDF semantics.
>>
>> So, even though they are equivalent per RDF semantics, we still maintain the cardinality. But if we query in SPARQL, we get two different things. Therefore, there is a mismatch between the semantics of SPARQL and RDF. Interesting, eh?
>>
>> Juan Sequeda
>> www.juansequeda.com
>>
>> On Apr 24, 2012, at 9:53 PM, David McNeil <dmcneil@revelytix.com> 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.
>>>
>>> Maybe I don't understand blank nodes properly. I thought the graph above was asserting the existence of two unique resources (since there are two blank node IDs).
>>>
>>> Thanks.
>>> -David
>
>
```

Received on Tuesday, 24 April 2012 22:22:56 UTC