There are several solutions that translate the schema and/or data extracted from relational databases into ontologies. One of the objectives of such translation is to achieve semantic integration between heterogeneous data models. The integrated data models can be used as input by reasoning tools. The existing solutions cover several aspects of the relational model.

We have developed a tool that translates a relational model and part of its instances into an ontology. It is a collaboration with Cristiane Huve, Hegler Tissot and Leticia Peres. The tool is available for download at https://github.com/caghuve/rdb-to-onto.  One of the key features of the tool is the utilization both logical an physical models in the translation. This enables having a target ontology with more appropriate names than typical table and column names. The tool architecture is depicted below.

It receives as input two definition scripts: 1) a metadata definition script, which contains information about the logical and physical data model; 2) a data definition script, which contains information about instances that could be mapped, for instance, to map hierarchies encoded in the database into the target ontology. Both files are processed by the existing mapping rules to produce the target ontology.

We implemented 11 mapping rules that cover a large part of the relational data model, and, particularly, the translation of hierarchies that are extracted from the instances. The translation result is an ontology with comprehensible names, such as the ones shown below. It is an excerpt of an ontology produced from a relational data model with medical information.

A detailed explanation of the solution has been recently published at IJSMO (International Journal of Metadata, Semantics and Ontologies), 2019 Vol. 13, No. 3, pp.191–208. It can be accessed here.