Skip to content

ObdalibMappingExtraction

skomlaebri edited this page Nov 29, 2013 · 5 revisions

Table of Contents

Mapping Extraction

Extracting mappings is an automatic way of generating mappings in an OBDA system. In the following we present an RDB-to-RDF standard and its usage in -ontop- for bootstrapping an initial flat ontology from a database source.

Direct Mapping

Direct mappings is a W3C recommendation for extracting mappings from a relational database into an RDF graph. In -ontop- this can be used to "bootstrap" the ontology, meaning to create automatically a starting flat ontology directly from the database. The basic idea of direct mapping is that the database information is turned directly into an ontology. Hence, each table name becomes a class, each column name becomes a data property, and each foreign key relation becomes an object property. The appropriate Uri is constructed for each class, data or object property.

-ontoPro- feature for mapping extraction

The Protege plugin for -ontop- now supports ontology and mapping extraction with the click of a button. Under the "OBDA" menu point, users can find "Bootstrap ontology and mappings" option. The user is asked which datasource to bootstrap (which database to extract from), and upon completion all the generated axioms and mappings will be added to the current ontology and associated to the chosen datasource.

The following example is taken from the ChEMBL database, release 16, that contains data about medical drugs and their chemical components. The database schema diagram can be found in the folder 'latest', named 'chembl_16_erd.png'.

After the execution is finished, the user has to make sure that there are no conflicts between the existing (if any) and the inserted vocabulary upon mapping extraction. If so, the ontology and mappings are editable after the extraction, and the problems can be corrected.

The resulting ontology in an overview looks as follows:

The data and object properties that have the same name have different Uri, for example 'chembl_id' is present five times as a data property, but each time it is constructed from a different table, hence its URI differs: 'http://example.org/assayas#chembl_id', 'http://example.org/docs#chembl_id', etc... The user can abstract this and start building superclasses and properties, adding hierarchy to the flat ontology.

Clone this wiki locally