Even though this step, i.e., the schema extraction
is done automatically, the user has the possibility to
intervene by choosing himself / herself which
relevant data to be mapped or left out. By default,
every table of the database will be mapped to a Class
in ontology, while every database attribute will be
mapped to a Property in ontology. Further mapping
relations between the database schema and the
ontology are presented in Table 1.
Table 1: Mapping rules.
Relational DB Ontology
Table Class | rdfs:Class
Attribute Property | rdf:Property
Tuple of X table Class X instance
Attributes of a tuple Instance literals
SQL datatypes
RDFS datatypes |
rdfs:Datatype
The remainder of this article is organized as
follows. Section 2 will cover the related work.
Section 3 summarizes the mapping schema, while
section 4 covers a mapping example. Finally, in
section 5, conclusions and future work will be
discussed.
2 RELATED WORK
In (Spanos, et al., 2012), authors have conducted a
survey on the creation of an ontology from an existing
database instance and the discovery of mappings
between an existing database instance and an existing
ontology. Their classification of the approaches falls
into two categories based on database reverse
engineering. Approaches that apply reverse
engineering try to recover the initial conceptual
schema from the relational schema and translate it to
an ontology expressed in a target language
(Aumueller, et al., 2005). On the other hand, there are
methods that, instead of reverse engineering
techniques, apply few basic translation rules from the
relational to the RDF model and/or rely on the human
expert for the definition of complex mappings and the
enrichment of the generated ontology model. The best
representatives of the former approach are: D2RQ,
SPYDER, COMA++ and Virtuoso.
D2RQ (Bizer and Seaborne, 2004) supports both
automatic and manual modes. In the automatic mode,
the ontology is created according to the rules common
among reverse engineering techniques. While in the
user assisted mode, the mapping is completely
specified by the user. It is similar to RDF Mapper
when used in semi-automatic mode, where the user
builds on the automatically generated mapping in
order to modify it at will.
Spyder (Miller and McNeil, 2010) creates an
RDFS view of a relational database, supporting the
entire range of automation levels. The automatic
mode is based on the basic approach and its own
mapping representation languages. Spyder’s mapping
language is rich, while the tool also supports a fair
amount of R2RML features.
COMA++ (Aumueller, et al., 2005) in contrast to
other systems from the same era, COMA++ is built
explicitly also for inter-model matching.
Virtuoso (Blakeley, 2007) offers an RDF view
over a relational database with its RDF Views feature
with similar functionality to D2RQ. It supports both
automatic and manual operation modes. In the
former, an RDFS ontology is created following the
basic approach, while in the latter, a mapping
expressed in the proprietary Virtuoso Meta-Schema
language is manually defined.
Another more recent paper (Sequeda, 2013)
discusses standards of W3C proposed to bridge the
gap between Relational Databases and Semantic
Web. It presents two specifications: mapping of
relational data to RDF and R2RML: RDB to RDF
mapping language. The R2RML subset called
R2RML
core
which has a simpler structure but could be
similar to Direct Mapping (Sequeda, et al., 2012) if
views are allowed as input. Direct Mapping.
3 MAPPING SCHEMA
RDF Mapper relies on the Apache Jena (Carroll, et
al., 2004) open source library for working with
ontologies. That means reading an ontology as well
as creating RDF instances based on that ontology. For
interacting with SQL databases, the corresponding
JDBC driver is used, while for visualizing RDF
graphs it utilizes another open source library, namely
Java Universal Network/Graph Framework
(JUNG)(O’Madadhain, et al., 2003).
Compared to the challenges of other mappers, which
are summarized in (Pinkel, et al., 2015), RDF Mapper
supports the following:
─ naming conflicts are resolved by letting the user
manually intervene during the mapping through
renaming of certain database schema constructs
towards unique naming conventions between
database and ontology,