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

On 24 Apr 2012, at 23:49, ashok malhotra wrote:
> OK.  Let's ask an empirical question.  If you start with the Relational table
> [Alice, 10]
> [Alice, 10]
> 
> And apply DM to it, then, according to the spec, do you get
> 
>  _:1<IOU#BORROWER>  "Alice".
>  _:1<IOU#AMOUNT>  10.
>  _:2<IOU#BORROWER>  "Alice".
>  _:2<IOU#AMOUNT>  10.
> 
> Just yes or no
> 
> I'm not asking what you should get and I'm not getting into RDF lean and mean semantics.
> I'm just asking what the spec says.

Yes, you get those four triples. The spec as written uses the “non-lean” direct mapping.

Richard




> 
> All the best, Ashok
> 
> On 4/24/2012 3:32 PM, Richard Cyganiak wrote:
>> Hi Ashok,
>> 
>> On 24 Apr 2012, at 22:07, ashok malhotra wrote:
>>> It seems clear that DM should generate
>>> 
>>>   _:1<IOU#BORROWER>  "Alice".
>>>   _:1<IOU#AMOUNT>  10.
>>>   _:2<IOU#BORROWER>  "Alice".
>>>   _:2<IOU#AMOUNT>  10.
>>> 
>>> If that's what the spec says, we are done.
>> This assertion is based on what?
>> 
>> To the best of my knowledge, the version above can only be implemented by either materializing the table, or by using Oracle-specific extensions, and it is incompatible with R2RML. (Someone smarter than me might still prove me wrong on this.)
>> 
>> There is another semantically equivalent version that is much easier to implement with just vanilla SQL, and works with R2RML.
>> 
>> What advantage do you get by choosing the more complex, SQL-incompatible, R2RML-incompatible version?
>> 
>> As far as I can tell, the advantage is that you get a more “natural” RDF graph structure for an infrequent corner case (tables without PK).
>> 
>> That advantage is not worth the cost and loss of compatibility.
>> 
>> I'd be happy with allowing both versions, but given the facts above, I don't think I can agree to forbidding the simpler, SQL-standard-compatible, R2RML-compatible version.
>> 
>> Best,
>> Richard
>> 
>> 
>> 
>>> There may well be a RDF semantics/SPARQL issue lurking here but that's another matter.
>>> All the best, Ashok
>>> 
>>> On 4/24/2012 1:13 PM, 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:56:27 UTC