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

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

From: Arjohn Kampman <arjohn.kampman@aduna.biz>
Date: Wed, 12 Nov 2003 16:44:41 +0100
Message-ID: <3FB25569.9070905@aduna.biz>
To: leo@gnowsis.com
Cc: www-rdf-interest@w3.org

Leo Sauermann wrote:
[...]
> If you query
> (?x foaf:firstname ?y) (?x foaf:image ?z)
> 
> I want to retrieve something like:
> x: http://gnowsis.com/leo
> y: "Leo"
> z: http://gnowsis.com/pictures/leo.jpg 
> 
> or
> 
> x: http://gnowsis.com/leo
> y: "Leo"
> z: null
> 
> but with today's RDQL this is more complicated:
> if there is no <foaf:image> triple for leo, you don't get any data at
> all.
> :-0
> AND THAT IS A PROBLEM, if you have ever programmed RDQL, thats the first
> thing you curse.
> because you can't retrieve a set of properties, you have to formulate
> queries for every single property, its just lame.

The SeRQL query language supports this kind of thing since the latest
release of Sesame[1]. It allows you to flag specific path expressions as
optional. A SeRQL query for the situation described above would be:

select x, y, z
from {x} <foaf:firstname> {y};
         [<foaf:image> {z}]

With the square brackets indicating an optional path expression.

For more info, see the SeRQL query language description at:
http://sesame.aidministrator.nl/publications/SeRQLmanual.html

Is this the type of thing that you are looking for?

Cheers,

Arjohn Kampman

[1] http://sourceforge.net/projects/sesame/

-- 
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 Wednesday, 12 November 2003 10:44:46 GMT

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