Converting database to RDF using D2RQ

359 views Asked by At

Using an Oracle database as a source, how do I convert the data from that database to RDF triples to be used in MarkLogic?

2

There are 2 answers

3
grtjn On BEST ANSWER

If you are talking about MarkLogic, you don't necessarily need a vocabulary. Take the primary keys as subject, column names as predicate, and cell values as object. You can insert that as triples in MarkLogic. It will give you a graph that you can query.

Translating columns into more sensible predicates might be useful though, and you might want to add in things like rdf:types, and subclassing maybe, but all that isn't strictly necessary. MarkLogic can do without that. You can also use Inferencing to alias and/or shorten certain paths afterwards, to effectively build the ontology you are looking for.

With smart introspection on the table structure, you might even be able to scan the database model dynamically, and build a generic conversion.

HTH!

2
Haroon Lone On

The first thing you need to have is Vocabulary, which is essentially dictated by your ontology (schema). So first fix your ontology and then convert your oracle based data rows into resources (individuals) of concerned ontology.

Once your vocabulary gets fixed you can use various available converters like: