Instructions to install and run RQL v2.1


RDFSuite      Overview      Download RQL      Documentation      Manual


RQL has been tested under the following OS:

RQL has been tested using the PostgreSQL v8.0 or higher as the underlying DBMS. Unicode support, during configuration, was enabled for PostgreSQL.


Contents


1. Software requirements


2. Installing RQL

Download RQL, unzip and untar the file. A new directory, called Interpreter, will be created. Enter this directory and run configure, according to the instructions given in this section. Then, execute make and, maybe, make install to build and install the package.

For example:
tar -xvfz rql-2.2.tar.gz

cd rql-2.2

./configure

make

More details about configuration, compilation and installation are following.

2.1 Configure options

DBMS Settings
RQL is using a DBMS (PostgreSQL). Please make sure that your LD_LIBRARY_PATH is set correctly to include paths to the library objects of the database (libpq). The configure script uses the pg_config command to get information about the installation of PostgreSQL (include and library paths). If necessary, users can specify paths to include files and library objects of the installation of PostgreSQL, by passing the following parameters to configure script:

--with-pg-libdir = <path to postgres library directory>

Specify the path to the postgres library directory (the place where libpq.so is placed). This option is mainly used if the system fails to locate libpq.so. Before trying this option, check if your LD_LIBRARY_PATH contains a path to libpq.so

--with-pg-includedir = <path to postgres include directory>

Specify the path to the postgres include dir (the place where libpq-fe.h and other files are placed). This option is mainly used if the system fails to locate a postgres include file.


Extra features
Various features can be enabled by passing the following parameters to the configure script:

--enable-debug

RQL will be compiled in debug mode (forcing the output of debugging messages and allowing debugging of the executable file using, e.g., gdb).

--enable-printqueries

If this option is given, the RQL Interpreter will print in the standard output all SQL queries that are used for the evaluation of an RQL query over a relational (PostgreSQL) DBMS.

--enable-hybrid
--enable-nosubtable

Regarding database representations: RSSDB supports three alternative database representations for the storage of RDF descriptions Uniquedata and nosubtable cannot be passed together. If these parameters are passed together, configure script fails and prints an error message.

--enable-dag

If the loaded (class or property) subsumption hierachies form Directed Acyclic Graphs (i.e., multiple isa), pass this option to configure, in order to optimize quering performance. In case where the hierachies are tree-structured, you can skip this parameter.

The following options should normally be left unchanged, unless you really know what you are doing.

--with-buf-size = <buffer size>

This option is used to declare the size of the buffer that is used when constructing SQL queries. Increase it from the default value only if you get an error in a case where an SQL query doesn't fit in the buffer. Otherwise, increasing the size of this buffer may deteriorate performance.

--with-prefetch-size = <number of tuples>

For each scan that is performed inside the RQL Interpreter, multiple tuples are fetched each time (in the style of prefetching in operating systems). Using this variable you can modify the number of tuples that are fetched each time. Whether increasing or decreasing this size will help performance depends mainly on the page size of the computer on which the system is run (to fetch as much data as possible, still avoiding page faults).

2.2 Building RQL

After the configuration step, RQL must be compiled. This can be done by using gmake (in Linux make is equivalent to gmake).

RQL library

type:
gmake or make

to compile the RQL code and generate:

2.3 Installation

After compilation is completed, users can use RQL applications and libraries from the installation directory (Interpreter). Applications are located at ./bin and library objects at ./lib . Users who do not have root access and/or do not want to install RQL in the system, may skip this chapter.

RQL can be installed in the system, by typing:

make install


from root or superuser account. By default, executables will be placed in the systems standar bin directory (e.g. /usr/local/bin) and libraries in the standar lib directory (e.g. /usr/local/lib).

Users can specify a location where executables and library objects will be installed, by passing the --prefix option at configuration time.

For example:

./configure --prefix = $HOME/local


will set $HOME/local/bin and $HOME/local/lib as installation folders for executables and library objects respectively.

Please type:

./configure --help


for more information on how to use --prefix and other similar parametes.

2.4 Clean/Uninstall RQL

RQL object files can be removed after compilation. In order to remove all compiled objects from the installation directory, type:

make clean

If RQL has been installed in the system, root or a superuser can uninstall RQL by typing:

make deinstall


3. Setting the database

RQL can run on top of an RDBMS containing appropriately stored RDF data. RDF Suite contains tools for loading RDF data into the database. More information on how to set a database from an RDF file, can be found at http://www.ics.forth.gr/isl/RDF/RSSDB/Install.html

Note: After loading data into a database using RSSDB, you can issue the following SQL commands, from inside psql (i.e., the command-line PostrgeSQL client), in order to optimize the PostgreSQL query evaluation engine for RQL queries:

ALTER DATABASE xxx SET ENABLE_SEQSCAN TO OFF
ALTER DATABASE xxx SET ENABLE_MERGEJOIN TO OFF

Due to a bug (presumably) in Postgres, the name of the database has to be in lower-case, in order for this command to work. You have to be a superuser or the owner of the database in order to be allowed to issue these commands.


4. Using RQL

There more than one ways to use RQL. There is a stand-alone command line client to issue queries. There is set of clients and a server to connect to remotely or locally. Last but not least, there are some libraries for embedding RQL into other applications.

4.1 RQL server

To launch the server, go to the bin directory and run:

./server_up.sh <port>


In order to shut down the server run the find_server.sh script and kill the server's process.

4.2 RQL clients

There are currently two kinds of client activity in RQL package.

4.3 RQL APIs

You can use the following APIs to create applications on top of RQL:


Last modified: Oct 14, 2006