W3C home > Mailing lists > Public > www-rdf-rules@w3.org > February 2002

Re: RDF query language

From: Wolfgang Nejdl <nejdl@kbs.uni-hannover.de>
Date: Wed, 20 Feb 2002 18:30:51 +0100
Message-Id: <200202201730.g1KHUpA03389@mahler.kbs.uni-hannover.de>
To: "Eric Prud'hommeaux" <eric@w3.org>
cc: Wolfgang Nejdl <nejdl@kbs.uni-hannover.de>, Libby Miller <Libby.Miller@bristol.ac.uk>, www-rdf-rules@w3.org, gt77@gmx.at, discuss@edutella.jxta.org
> On Thu, Jan 31, 2002 at 08:52:12PM +0100, Wolfgang Nejdl wrote:
> > > 
> > > I just sent this reply to the rdf interest group list: I thought it
> > > might be worth posting it here as well, in case I've missed out lots of
> > > systems or got the details wrong.
> > > 
> > 
> > Edutella (edutella.jxta.org) includes a Query Exchange Language based
> > on Datalog semantics, called RDF-QEL-i (it's actually a family of
> > languages, but with one common semantics). It is described in a WWW'11
> > paper (see http://edutella.jxta.org/reports/edutella-whitepaper.pdf
> > for the preliminary version).
> 
> I'll add it to my survey or RDF query languages [1]. Perhaps you could
> construct the query that I've been using as an example in the rest of

Sure. The query is a simple conjunctive query, therefore it is
expressible in RDF-QEL-1, and the RDF notation of the query looks like
follows (excluding the obvious namespace declarations):

<edu:Query rdf:ID="ExampleQuery">
    <rdf:type rdf:resource=edu:Query/>
    <edu:hasVariable rdf:resource="#service/>
    <edu:hasVariable rdf:resource="#port/>
    <edu:hasVariable rdf:resource="#binding/>
    <edu:hasVariable rdf:resource="#bindingName/>
</edu:Query>

<edu:Variable rdf:ID="service">
    <rdf:type rdf:resource=wsdl:service/>
    <wsdl:hasPort rdf:resource="#port"/>
</edu:Variable>

<edu:Variable rdf:ID="port">
    <wsdl:binding rdf:resource="#binding"/>
</edu:Variable>

<edu:Variable rdf:ID="binding">
    <wssoap:style rdf:resource=wssoap:document"/>
    <wsdl:name rdf:resource="#bindingName"/>
</edu:Variable>

<edu:Variable rdf:ID="bindingName"/>

Basically, this is simply the description of the RDF graph
representing the conjuctive query, with additional information to
specify the nodes as variables. If you want a modified query, which
has some of these variables already instantiated, you just have to use
the appropriate resources/literals instead of the variable nodes.

The result of this query are the instantiated RDF-graphs, which match
with this query. Using the current semantics of RDF-QEL-i, you do not
get additional statements back connected to the instantiated
variables, unless you specify the properties you want to retrieve
explicitly (i.e. you just get the subgraph back you asked for).

In Datalog notation, the query looks like

?- rdf:type(Service, wsdl:service), wsdl:hasPort(Service, Port), 
   wsdl:binding(Port, Binding), wssoap:style(Binding, wssoap:document),
   wsdl:name(Binding, BindingName).

where variables are written with uppercase characters. 

If you want to select only Port and BindingName, you use

?- exampleQuery(Port, BindingName).

exampleQuery(Port, BindingName) :- 
   rdf:type(Service, wsdl:service),
   wsdl:hasPort(Service, Port),  
   wsdl:binding(Port, Binding), 
   wssoap:style(Binding, wssoap:document),
   wsdl:name(Binding, BindingName).

Using RDF-QEL-3 or higher, you can write arbitrary Datalog queries,
which consist of a set of Horn clauses, which however look a little
bit more convoluted in RDF notation because we have to use reification
for all queries strictly more powerful than pure RDF (i.e. RDF-QEL-2
and above).

> the document. Also, do you have an HTML version of the document?

Right now we just have the PDF-version, but when we produce an
HTML-version, we'll add it to our reports directory. 

> 
> [1] http://www.w3.org/2001/11/13-RDF-Query-Rules/
> 
> > > On Thu, 31 Jan 2002 gt77@gmx.at wrote:
> > > 
> > > > Hi!
> > > >
> > > > Im going to write my diploma thesis about evaluating different RDF-query
> > > > languages.  Therefore I would like to know, if someone can give me an brief
> > > > overview (or interesting links) about the most important and powerful query
> > > > languages (like redland or jena), which I should include in my thesis. Many
> > > > thanks in advance!
> > > >
> > > > Gerald
> > > >
> > > > --
> > > > GMX - Die Kommunikationsplattform im Internet.
> > > > http://www.gmx.net
> > > >
> > > >
> > > 
> > > Hi Gerald. I think other people might have a better summary than I do,
> > > but I have a bunch of notes from something else I've been doing about a
> > > simple query language that I've been working on with Andy Seaborne
> > > called SquishQL, which is why I'm interested (see notes below, which
> > > are not comprehensive). You might also like to try
> > > www-rdf-rules@w3.org, which is the mailing list
> > > for rdf rules and query. Look at its archive:
> > > http://lists.w3.org/Archives/Public/www-rdf-rules/
> > > 
> > > I'm not sure what you mean by 'important and powerful' query langauges.
> > > There are a number of RDF management systems out there which include
> > > large databases and use query languages. Some don't have query
> > > languages, like Redland, but are still very useful and scalable. I've
> > > been using a simple RDF query language, because it meets my
> > > requirements.
> > > 
> > > Hope this helps anyway.
> > > 
> > > Libby
> > > 
> > > 
> > > Some RDF query languages have been in in use for several years.
> > > R.V. Guha's rdfDB query language [1] was the first of these (as far as I
> > > can tell) and is the basis for SquishQL. It is a simple graph-matching
> > > query language designed for use with the rdfDB system. It differs
> > > slighty syntactically from SquishQL and also does not contain the
> > > constraints on the variables used by SquishQL. It returns results as a
> > > table. rdfDB is written in C, I think.
> > > 
> > > Algae [2] is another early query language for RDF, written by Eric
> > > Prud'hommeaux of W3C in Perl. It uses an S-expression syntax to do graph
> > > matching. It can handle contraints of some kinds, I think. It is used to
> > > power the W3C's Annotea annotations system [3], and other software at
> > > the W3C. It's written in Perl, and can be used with an SQL database.
> > > 
> > > RQL [4] has a very different syntax, based on OQL, but can perform
> > > similar sorts of queries, with the added power of syntactic support for
> > > transitive closure on RDF subclass and subproperty. It is used by the
> > > Sesame system [5].
> > > 
> > > SquishQL is one of a number of query languages syntactically similar to
> > > rdfDB's. These include one by Geoff Chappell for RDFGateway [6], and one
> > > by David Allsopp [7]. RDFGateway QL is interesting because it is a
> > > simple query language over a database that can understand and process
> > > rules. David Allsopp's QL has syntactic support for regex path
> > > expressions.
> > > 
> > > There are a number of other query languages being created at the moment,
> > > including a DAML QL [8], Triple [9], RDFPath [10]. There a number of
> > > papers at QL98 that you might find helpful, including one by R.V.Guha et
> > > al [11] which heavily influenced SquishQL. It might also be worth
> > > looking at the notes from the RDF Query birds of a feather meeting last
> > > August [12].
> > > 
> > > I've been working on SquishQL, formerlly Squish[13], a simple SQL-ish
> > > RDF query language for a couple of years with Dan Brickley and also with
> > > Andy Seaborne of HP, who has done an implementation called RDQL[14] for
> > > Jena. I have an implementation called Inkling[15].
> > > 
> > > [1] http://web1.guha.com/rdfdb/query.html http://guha.com/rdfdb/
> > > 
> > > [2] http://www.w3.org/2001/Talks/0505-perl-RDF-lib/slide8-0.html
> > > 
> > > http://ilrt.org/discovery/2001/08/rdfquery-bof/
> > > 
> > > http://www.w3.org/2001/Annotea/User/Protocol.html
> > > 
> > > http://www.w3.org/1999/02/26-modules/User/Algae-HOWTO.html (BNF)
> > > 
> > > http://www10.org/cdrom/papers/488/
> > > 
> > > [3] http://www.w3.org/2001/Annotea/
> > > 
> > > [4] A paper on RQL
> > >        http://www.ics.forth.gr/proj/isst/RDF/RQL/rql.html
> > >        BNF
> > >        http://139.91.183.30:9090/RDF/RQL/bnf.html
> > >        RQL tutorial
> > >        http://sesame.aidministrator.nl/
> > > 
> > > [5]
> > >        http://sesame.aidministrator.nl/
> > > 
> > > 
> > > [6]
> > > http://www.intellidimension.com/RDFGateway/Docs/rdfqlgettingstarted.asp
> > > 
> > > [7] http://ilrt.org/discovery/2001/08/rdfquery-bof/
> > >           http://www.semanticweb.org/SWWS/program/full/paper10.pdf
> > > 
> > > [8] http://www.ai.sri.com/daml/notes/HW2/SemanticWeb/paper.html
> > >        http://www.daml.org/listarchive/joint-committee/0572.html
> > > 
> > > http://lists.w3.org/Archives/Public/www-archive/2001Sep/0016.html
> > >        http://www.w3.org/2000/10/swap/test/dpoq22Aug/query-answer.daml
> > >        http://www.daml.org/listarchive/joint-committee/0598.html
> > > 
> > > - probably more by now...
> > > 
> > > [9]
> > > 
> > > http://www.daml.org/listarchive/joint-committee/0673.html
> > >           http://www.dfki.uni-kl.de/frodo/triple/
> > > 
> > > [10] http://groups.yahoo.com/group/rdfpath/
> > > 
> > > 
> > > [11] http://www.w3.org/TandS/QL/QL98/pp/enabling.html
> > > 
> > > [12] http://ilrt.org/discovery/2001/08/rdfquery-bof/
> > > 
> > > [13] http://ilrt.org/discovery/2000/10/swsql/
> > > 
> > > [14] http://hpl.hp.com/semweb/
> > > 
> > > [15] http://swordfish.rdfweb.org/rdfquery/
> > > 
> > > 
> > 
> > 
> > --
> > Wolfgang Nejdl
> 
> -- 
> -eric
> 
> (eric@w3.org)
> Feel free to forward this message to any list for any purpose other than
> email address distribution.


--
Wolfgang Nejdl
Received on Wednesday, 20 February 2002 12:31:42 GMT

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