Using an Oracle database as a source, how do I convert the data from that database to RDF triples to be used in MarkLogic?
Converting database to RDF using D2RQ
359 views Asked by Swapneel Golapkar At
2
There are 2 answers
2
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:
- Google Refine
- http://www.w3.org/wiki/ConverterToRdf
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!