Virtuoso Storage Backend

The Virtuoso storage backend provides access to Virtuoso servers. It can connect to already running servers as well as spawn its own local instance. The Virtuoso server is accessed via ODBC through the client library iODBC. Currently no other client libraries are supported (which also means that this backend can only be used on systems that have libiODBC which excludes Windows).

The name of the backend is virtuosobackend. Thus, to use it one simply has to load it as follows:

 const Soprano::Backend* virtBack = Soprano::PluginManager::instance()->discoverBackendByName("virtuosobackend");

Supported Settings

The Virtuoso backend supports the following settings which can be passed to Soprano::Backend::createModel:

The settings above are user settings and have to be provided using Soprano::BackendOptionUser:

 Soprano::BackendSettings settings;
 // configure the used indexes
 settings << Soprano::BackendSetting( "indexes", "spog,posg,opsg" );

 // set the full text index to be updated every 10 minutes
 settings << Soprano::BackendSetting( "fulltextindex", "10" );

The following setting is required for starting a local instance of Virtuoso:

The following settings need to be provided to access an already running Virtuoso server:

Virtuoso Specialities

Since Virtuoso is an SQL server and, thus, does store all RDF data in SQL tables it has some characteristics that are worth mentioning:

The Empty Graph

Virtuoso/SPAURL has no notion of the empty/default graph. Thus, by default, it is not possible to add statements to the empty/default graph. The Soprano backend works around this problem by introducing a special named graph which is used internally to store triples that belong to the default/empty graph.

This means that a conversion needs to take place whenever the empty graph or the special graph are encountered. This introduces a slight performance penalty. In the future an option might be introduced to disable this behaviour.

SQL Types

Virtuoso, being an SQL server, does not have specific types for boolean, decimal and others. They are all represented as SQL integer values.

The backend does solve this issue for boolean values only by introducing a fake datatype for boolean literals. This is converted internally so the user of the backend will never notice it. The only exception may be queries that contain filters. More input is needed here.


Generated on Fri Feb 4 17:10:16 2011 for Soprano by  doxygen 1.5.6