[bxmlt2005] Cristian Pérez de Laborda: Querying Relational Databases with RDQL

Yay! This is very close to my D2RQ and sparql2sql work and one of the talks I’ve been looking forward to.

Cristian is from the Heinreich Heine Universität Düsseldorf. He wants to make the data in relational databases available as RDF. This is the same idea as D2RQ. But they do the mapping completely automatically. This turns every database into a source of RDF data.

Relational.OWL is an ontology for describing the structure of databases: tables, columns, primary keys etc. So it’s a meta-schema for describing relational schemas. Using this, it’s easy to write down the contents of a DB as RDF.

So how to get RDF data out of a database? Use an RDF query language! Crisitan picked RDQL.

An RDQL query might look like this:

SELECT ?person, ?name
WHERE (?person, rdf:type, dbs:PERSON)
      (?person, dbs:PERSON.NAME ?name)

This picks a person and its NAME column from the PERSON table. Class and property names are prescribed by the table and column names of the DB schema.

So is RDQL expressive enough to replace SQL? He aims a bit lower and tries to show that RDQL is as expressive as relational algebra. This is a bit weird because an RDQL result is not RDF, but a table-like structure. This means you can’t chain RDQL expressions, while you can always chain relational algebra expressions to form arbitrarily complex expressions.

He demoes a little tool that lets you enter an RDQL query like the one above, and it translates this to SQL and returns the results.

Unlike RDQL, SPARQL can return RDF graphs and could be better than RDQL for the job, but this remains as future work.

[The difference between this approach and D2RQ is that they have a simple, but automatic, 1:1 mapping from tables/columns to classes and properties, while with D2RQ, a custom mapping into any RDF vocabulary is possible, but has to be defined manually by an expert.]

This entry was posted in General, Semantic Web. Bookmark the permalink.