W3C home > Mailing lists > Public > www-rdf-rules@w3.org > January 2003

Re: RDF query testcases?

From: Jeen Broekstra <jeen.broekstra@aidministrator.nl>
Date: Tue, 21 Jan 2003 10:26:50 +0100
Message-ID: <3E2D125A.8010905@aidministrator.nl>
To: Libby Miller <Libby.Miller@bristol.ac.uk>
CC: www-rdf-rules <www-rdf-rules@w3.org>

Libby Miller wrote:

> this is great, thanks Jeen.
> 
> quick question: Sesame supports RDF schema right? so if I did a query
> in RDQL over Sesame over an ontology like Wordnet (e.g.
> http://xmlns.com/wordnet/1.6/Person) would I get both Person and
> Life_form as the classes of an instance of Person? 

Yes.

My RDQL is somewhat shaky, but the query would be something like:

SELECT ?c
WHERE (?p, <rdf:type>, <wn:Person>),
       (?p, <rdf:type>, ?c)

Right?

 > What if I did the same query in RQL?

The same. In Sesame, the deductive closure is computed independently of 
the query module, so both RQL and RDQL could retrieve all these answers.

The RQL query in this case would be something like:

SELECT typeOf( p )
FROM   wn:Person { p }

The difference is in the fact that RQL can explicitly express certain 
types of schema semantics in the query, making it possible to express 
queries about the schema more easily, and sometimes go beyond what's 
expressible in an RDF-only QL.

A simple example of this is direct subclass relations (A is a direct 
subclass of B iff there is no C: A < C < B): this is a relation that 
would be rather awkward to express in RDQL, but RQL has a special 
language feature for it.

> I'm asking this because I was asked to recommend a tool that could be
> used for querying a fairly simple, heirarchical ontology (actually
> more like a thesaurus - MeSH,
> http://www.nlm.nih.gov/mesh/meshhome.html), such that you could, say,
> ask for all research groups with 'abdomen' or anything above it in the
> heirarchy as their descriptive keyword. (I'm now also wondering whether
> things below it in the heirarchy might be more useful...)
> 
> Does that make any sense?

This would be fairly straightforward to express, I imagine, so yes :)

Best regards,

Jeen
-- 
jeen.broekstra@aidministrator.nl
aidministrator nederland bv - http://www.aidministrator.nl/
julianaplein 14b, 3817 cs amersfoort, the netherlands
tel. +31-(0)33-4659987, fax. +31-(0)33-4659987
Received on Tuesday, 21 January 2003 04:28:28 GMT

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