Re: Semantic Web Phase 2 Activity - Protocol - Query Language

Hash: SHA1

Asleep at the keyboard here. I had the same issue in my extension
of squish (called esquish [1]) for rubyrdf. It started with optionals (to
make my life easy) then I began adding wackier things...

Jeen Broekstra <> writes:

> [Cc also sent to sesame-devel, since we discussed this problem there
>   today]
> Seaborne, Andy 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?
> I have earlier sent a reply on this to Andy alone, on how SeRQL
> currently handles it, but I've spent some time thinking about this and
> discussed it on the sesame-devel list a bit further.
> I think the example query is ill-defined: regardless of the actual
> dataset being queried it is not possible to assign an unambiguous
> semantics to it. The problem is that a variable is shared across
> several optional path matches, neither of which definitely assign the
> variable a value.
>> ?? 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.

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.


[1] <>
Version: GnuPG v1.2.3 (Darwin)
Comment: Processed by Mailcrypt 3.5.8 <>


Received on Thursday, 13 November 2003 11:08:12 UTC