Skip to content
Redland Rasqal RDF Query Library
C Groff HTML Makefile Perl Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" lang="en" xml:lang="en">
  <title>Rasqal RDF Query Library</title>
  <link rel="meta" type="application/rdf+xml" title="DOAP" href="rasqal.rdf" />

<h1 style="text-align:center">Rasqal RDF Query Library</h1>
<h2 style="text-align:center"><a href="">Dave Beckett</a></h2>


<p><a href="">Rasqal</a> is a free software
/ Open Source C library that handles Resource Description Framework
(RDF) query language syntaxes, query construction and execution of
queries returning results as bindings, boolean, RDF graphs/triples or
syntaxes.  The supported query languages are SPARQL 1.0, RDQL, Draft
SPARQL Query 1.1, Update 1.1 Syntax and Experimental SPARQL
extensions (LAQRS).  Rasqal can write binding query results in the
Turtle / N3 and read them in SPARQL XML, RDF/XML and Turtle / N3.

<p>Rasqal was designed to work closely with the
<a href="">Redland RDF library</a>
and the Raptor[2] RDF Syntax Library but is entirely separate from both.

<p>This is a beta quality library - the code is mature but the API is
still changing and the SPARQL support is under development.  It is a
portable library and has been tested on multiple POSIX systems and
architectures.  Rasqal has no known memory leaks.

<p>A summary of the changes can be found in the
<a href="NEWS.html">NEWS</a> file and detailed API changes in the
<a href="RELEASE.html">release notes</a>.</p>

<p>Rasqal provides:</p>
<li>An RDF <a href="docs/api/query.html">query</a> construction and access API.</li>
<li>Query language support for <a href="">SPARQL 1.0</a> and parts of draft <a href="">SPARQL 1.1 Query</a>.</li>
<li>Query language support for <a href="">RDQL</a>.</li>
<li>A query execution engine including grouping, aggregate expression and filtering evaluation.</li>
<li>A query result binding API.</li>
<li>Query result bindings formatting into SPARQL XML, SPARQL JSON, CSV, TSV, HTML, ASCII tables, RDF/XML, Turtle / N3 and from SPARQL XML, RDF/XML and Turtle / N3.</li>
<li>Triple store querying APIs to support running over external RDF graphs.</li>
<li>No memory leaks.</li>
<li><a href="roqet.html">roqet</a> standalone command line RDF query utility program</li>

<p>Known bugs and issues are recorded in the
<a href="">Redland issue tracker</a>.

<p>Rasqal does not provide an RDF API or triple store, but relies on
external libraries implementing the triple store API providing
matched RDF data originally from a specified content URI.  Rasqal
ships with a triple store implementation using the output of an RDF
parser from <a href="">Raptor</a>.
This can be called using the standalone
command line <a href="roqet.html">roqet</a>
query utility giving a query language
identifier (default sparql), the query string and optionally
the data to use unless it is declared in the query string.

<p>Rasqal is used inside Redland to provide support for query
languages, a query API and a result bindings API over graphs stored
in indexed Redland triple stores.  Since this can index the triples
it will be faster than the default rasqal triple store of reading
the triples from Raptor into memory when the queries are complex.

<h2>Supported Query Languages</h2>

<h3>SPARQL Query Language for RDF</h3>

<p>Rasqal provides support for the W3C SPARQL Query Language 1.0
developed by the W3C
<a href="">RDF Data Access Working Group</a>,
as defined in
<a href="">SPARQL Query Language for RDF</a>, W3C Recommendation 15 January 2008.
It currently implements most of the functionality except for
<code>UNION</code> and nested <code>OPTIONAL</code>s.
For detailed information on the implementation state, see the Rasqal
bugs in the <a href="">Redland issue tracker</a>.
It also implements some of the
<a href="">SPARQL 1.1 Query</a>
<a href="">SPARQL 1.1 Update</a>
W3C working drafts of 14 October 2010.

<h3>RDF Data Query Language (RDQL)</h3>

<p>Rasqal provides a complete implementation of the RDQL language, as defined in
<a href="">RDQL - A Query Language for RDF</a>,
W3C Member Submission 9 January 2004
based on the earlier versions in Jena.
<em>RDQL RDF Data Query Language</em>
<a href="">RDQL RDF Data Query Language</a>
and the
<em>RDQL Grammar</em>.
<a href="">RDQL Grammar</a>.
<a href="">Jena RDQL Tutorial</a>
gives an introduction on the language.
Rasqal currently passes all the
<em>Jena RDQL test suite</em>
<a href="">Jena RDQL test suite</a>
bar a couple.
Detail of the status of the RDQL support is given in the
<a href="">Redland issue tracker</a>.</p>

<h3>LAQRS Adds to Querying RDF in SPARQL (LAQRS)</h3>

<a href="">LAQRS</a>
is an <b>experimental</b> set of syntax extensions for SPARQL.  The
syntax and features may change at any time.  At present Rasqal
provides parsing and API support for alternate update syntaxes,
the <code>EXPLAIN</code> keyword, plus executing a few experimental
extension functions: NOW() / CURRENT_DATETIME(), FROM_UNIXTIME() and

<h2>Installation and Documentation</h2>

<p>The public API is described in the
<a href="docs/api/index.html">API reference</a>.
It is demonstrated in the
<a href="roqet.html">roqet</a>
utility program which shows how to call the query engine and
operate over the query results.  When Rasqal is used inside
<a href="">Redland</a>,
the Redland documentation explains
how to call the query engine and contains several example programs.

<p>To build and install Rasqal from sources see the
<a href="INSTALL.html">Installation document</a>.


<p>The packaged sources are available from
<a href=""></a> (master site) and also from the
<a href="">SourceForge site</a>.
The development GIT sources can also be
<a href="">browsed on GitHub</a>
or checked out at git://

<p>Rasqal requires <a href="">Raptor</a> 2.0.0
or newer to build and run, which can be downloaded from the same area
as the Rasqal source and binaries.</p>


<p>This library is free software / open source software released
under the LGPL (GPL) or Apache 2.0 licenses.  See
<a href="LICENSE.html">LICENSE.html</a> for full details.</p>

<h2>Mailing Lists</h2>

<a href="">Redland mailing lists</a>
discusses the development and use of Rasqal and Redland as well as
future plans and announcement of releases.</p>

<hr />

<p>Copyright (C) 2003-2011 <a href="">Dave Beckett</a><br />Copyright (C) 2003-2005 <a href="">University of Bristol</a></p>

Something went wrong with that request. Please try again.