Re: example SQL mapping to direct graph

On 1/19/2011 5:07 PM, Alexandre Bertails wrote:
> Hi Lee,
>
> On Wed, 2011-01-19 at 13:40 -0500, Lee Feigenbaum wrote:
>> On 1/19/2011 11:43 AM, David McNeil wrote:
>>> On Wed, Jan 19, 2011 at 10:29 AM, Eric Prud'hommeaux<eric@w3.org
>>> <mailto:eric@w3.org>>  wrote:
>>>
>>>      At the end of 2006, Fred Zemke interceded to keep the
>>>      SPARQL semantics from having ambiguous cardinality, which cost months
>>>      but gave us invaluable definition in the semantics.
>>>
>>>
>>> Eric - Can you elaborate on this and/or provide a link to what you are
>>> referring to? In particular I am trying to understand the cardinality
>>> semantics defined by SPARQL.
>>
>> The SPARQL algebra operates over multisets of solutions, and the algebra
>> operations all define how they affect the cardinality of the solutions.
>> To take a very simple example:
>>
>> {
>>     ?s :p :o
>> } UNION {
>>     ?s :p :o
>> }
>>
>> against the data:
>>
>> :s :p :o .
>>
>> Results in this solution (multi)set:
>>
>> ?s
>> --
>> :s
>> :s
>>
>> In the absence of the DISTINCT or REDUCED keywords, any compliant SPARQL
>> implementation must give you 2 copies of the ?s=:s solution in response
>> to this query.
>
> Does it mean that SPARQL cannot be implemented using Datalog? If I
> understand well, there will be no way to be correct against the
> semantics as Datalog relies on sets.

Hi Alexandre,

I'm not at all familiar with datalog, but if it's not capable of 
returning duplicate solutions to a query, then yes, it's not capable of 
implementing SPARQL in a fully compliant manner.

lee

>
> Alexandre.
>
>>
>> Lee
>>
>>>
>>> Thank you.
>>> -David McNeil
>>
>>
>
>
>

Received on Wednesday, 19 January 2011 22:30:57 UTC