W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2003

Re: [Sesame-devel] Re: Semantic Web Phase 2 Activity - Protocol - Query Language

From: Arjohn Kampman <arjohn.kampman@aduna.biz>
Date: Fri, 14 Nov 2003 16:35:37 +0100
Message-ID: <3FB4F649.2050105@aduna.biz>
To: Damian Steer <pldms@mac.com>
Cc: Jeen Broekstra <jeen@aduna.biz>, "Seaborne, Andy" <Andy_Seaborne@hplb.hpl.hp.com>, 'Steve Harris' <S.W.Harris@ecs.soton.ac.uk>, www-rdf-interest@w3.org, sesame-devel@lists.sourceforge.net

Damian Steer wrote:
[...]
>>>Hi there - I have an example query with optional triples and I wondered what
>>>the various systems do with it:
>>>Thanks to Jeremy Carroll for this example.
>>>Consider the data:
>>><x> <p> <y> .
>>><x> <q> <z> .
>>>and the query:
>>>[ <x> <p> ?a ]
>>>[ <x> <q> ?a ]
>>>where [] is an optional match.
>>>?? Does the query match the data?

[...]

>>>?? What does it return?
>>
>>I'm heavily leaning towards saying that the query engine should return
>>a "malformed query" error.
>>
>>In the discussion on sesame-devel, Jacco van Ossenbruggen came up with
>>a constraint on optional path expressions: reuse of a variable across
>>optional paths is allowed if and only if the variable is also used in
>>a non-optional path in the same query. This disambiguates the use of
>>the shared variable in optionals, since optional paths will no longer
>>have to instantiate the shared variable, they will only have to
>>validate the current instantiation.
> 
> 
> Yes. That was my conclusion to the issue - essentially 'sanity
> checking'. It doesn't seem unreasonable.

Unless someone is able to give a plain-English description of what this
query is meant to return, i.e. a sentence starting with something like
"Give me all values that...". We were not able to come up with such a
description. Anyone?

> I should add that I did consider returning graphs rather than variable
> bindings, which has the virtue that the results are
> unambiguous. However this, in my case, was essentially useless as I
> was trying to retrieve information from a graph, and returning a graph
> seemed a little perverse.

Amen. This is exactly why SeRQL offers both: you need table-like query
results in the end because otherwise you stuck with graphs forever.

Cheers,

Arjohn

-- 
arjohn.kampman@aduna.biz
Aduna B.V. (formerly known as aidministrator) - http://www.aduna.biz/
prinses julianaplein 14-b, 3817 cs amersfoort, the netherlands
tel. +31-(0)33-4659987  fax. +31-(0)33-4659987
Received on Friday, 14 November 2003 11:39:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:03 GMT