Loading the rdf data cube in a triple store (database).

Now that we have all our data in RDF, we can load them into an RDF triple store which allows us to query the cube using the standard query language SPARQL.

There are several options for choosing a triple store. In the open source world we have, amongst others, Jena Fuseki from the Apache Software Foundation and RDF4J from the Eclipse foundation. Some commercial vendors also offer free, community versions of their triple store products, for example Stardog and GraphDB.

In this example we will use RDF4J server. For installation and start-up instructions, see the RDF4J documentation at http://docs.rdf4j.org/server-workbench-console/.

After installation and start-up the web interface is available at http://localhost:8080/rdf4j-workbench/.

To create a new database, click New Repository in the left pane and fill in the Type of database, the ID of the database, and a human-oriented Title. For example:

creating a database

Click Next and approve the next screen by clicking Create.

The database gets created and the server reports back with the following summary:

database created

As you can see, the database is empty: Number of Statements: 0.

We now need to load the triples created in the previous phases using table2qb: in the Modify section in the left pane, click Add.

add data to the datacube

Click Browse ... next to RDF Data File to point to a turtle file generated in previous phase and click Upload.

Repeat this for each of the turtle files we generated:

In addition, upload also the following (using the same Browse ... button):

In our case we have loaded a data cube consisting of 42315 triples ready to be queried.

the database loaded

See also: