Chris Bizer
Richard Cyganiak

D2R Server provides SPARQL access to relational databases. It takes SPARQL queries from the Web and rewrites them via a D2RQ mapping into SQL queries against a relational database. This on-the-fly translation allows RDF applications to access the content of large databases without having to replicate them into RDF. D2R Server can be used to integrate existing databases into RDF systems, and to add SPARQL interfaces to database-backed software products.

D2R Server combines the D2RQ API and Joseki SPARQL Server to map a database's contents into a virtual RDF graph that can be accessed over the SPARQL protocol. It is bundled with a Jetty webserver.

Download D2R Server

v0.2.1 (alpha), released 2006-06-01

News

Requirements

You need:

Installing and running D2R Server

  1. Extract the archive into a suitable location. Optionally, add the extracted directory (where the d2r-server and d2r-server.bat files reside) to the path.

  2. Download a JDBC driver from your database vendor. Place the driver's JAR file into D2R Server's /lib directory. A list of JDBC drivers from different vendors is maintained by Sun. Also take note of the driver class name (e.g. org.postgresql.Driver for PostgreSQL or oracle.jdbc.driver.OracleDriver for Oracle) and JDBC URL pattern (e.g. jdbc:mysql://servername/database for MySQL) from the driver's documentation. A driver for MySQL is already included with D2R Server.

  3. Generate a mapping file for your database schema. Change into the D2R Server directory and run:

    generate-mapping -o mapping.ttl -d driver.class.name
        -u db-user -p db-password jdbc:url:...

    Replace the parts in italics with appropriate values. mapping.ttl is the name for the new mapping file. -d can be skipped for MySQL.

  4. Start the server:

    d2r-server mapping.ttl

    The SPARQL endpoint is at http://localhost:2020/sparql and can now be queried by SPARQL clients.

  5. Testing the Server: Open http://localhost:2020/ in a web browser.

    Screenshot of D2R Server's web interface

    You can use the SPARQL form to execute queries and display results in a number of formats, or use the Browse box on the right to explore the endpoint's contents.

    Screenshot of D2R Server's SPARQL explorer

  6. Customize the database-to-RDF mapping by editing the mapping file with a text editor. Its syntax is described in the D2RQ Manual. D2R Server will automatically detect changes to the mapping file and reload appropriately when you hit the browser's refresh button.

Pre-built mapping files

We collect mapping files for popular database-driven applications.

Have another one? Please share it.

Source code and development

D2R Server is hosted by SourceForge.net as part of the D2RQ project. The latest source code is available from the project's CVS repository and can be browsed online.

SourceForge Logo

Support and feedback

You can contact us on the D2RQ mailing list at d2rq-map-devel@lists.sourceforge.net.