<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>RML mappings.
J. Web Sem.</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Comparing Query Answering in OBDA Tools over W3C-Compliant Speci cations</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Manuel Namici</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe De Giacomo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DIAG, Sapienza, University of Rome lastname @diag.uniroma1.it</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2010</year>
      </pub-date>
      <volume>33</volume>
      <issue>141</issue>
      <fpage>9</fpage>
      <lpage>13</lpage>
      <abstract>
        <p>The Ontology-Based Data Access (OBDA) paradigm aims at providing to the users a uni ed and shared conceptual view of the domain of interest (ontology), while still enabling the data to be stored in di erent data sources. Such data are mapped to the ontology through declarative speci cations. In this work we consider the ontology expressed in OWL 2 QL, relational sources, the mapping expressed in R2RML, and the user queries expressed in SPARQL. In this W3C-compliant setting, we compare query answering in the two main tools for OBDA, namely, Mastro and Ontop, by resorting to the NPD Benchmark, and the fulledged OBDA application developed for the Italian Automobile Club (ACI). We also discuss how R2RML support is added to Mastro.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>adopted in the Optique Project3, and adapted for benchmarking purposes in
the OBDA setting, that is available online4. (ii) The ACI application that is
currently in development between Sapienza University of Rome and the Italian
Automobile Club (ACI).</p>
      <p>
        The rest of this work is organized as follows: In Section 2, we give an overview
of the systems that we have considered, Mastro and Ontop. In Section 3 we
brie y describe how support for the standard R2RML mapping language has
been integrated in Mastro. In Section 4, we discuss the comparison over the NPD
Benchmark, a speci cation developed by the University of Oslo, and adapted for
its use as a benchmark in the OBDA setting [
        <xref ref-type="bibr" rid="ref3 ref5 ref6">6,3,5</xref>
        ]. In Section 5, we discuss the
comparison over an application of the OBDA paradigm, developed in
collaboration between Sapienza University of Rome and the Italian Automobile Club
(ACI), that is used to evaluate the bene ts of the OBDA approach in a real
industrial setting.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Overview of the systems</title>
      <p>
        Mastro is a Java tool for Ontology-Based Data Access, developed by OBDA
Systems5 and Sapienza University of Rome. The theoretical foundations
underpinning the system are those described in [
        <xref ref-type="bibr" rid="ref1 ref10 ref2">1,2,10</xref>
        ].
      </p>
      <p>
        Ontologies in Mastro are speci ed in a logic of the DL-Lite family of lightweight
DLs, that is the logic underpinning the OWL 2 QL pro le of the standard OWL
2 language. The system is equipped with a module that enables ontologies
expressed in the OWL 2 language to be approximated in the fragment of DL-Lite
supported by Mastro, using the semantic approach presented in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The query
language supported by Mastro is a subset of the SPARQL 1.0, corresponding to
the class of (union of) conjunctive queries.
      </p>
      <p>
        The mappings in Mastro are expressed in an internal format, written in XML
syntax. In addition, through the course of this work, we adapted the system to
support most of the R2RML standard as an alternative mapping language. The
set of mappings in Mastro can be represented as a triple hMo; Mv; i, where:
{ Mv constitutes the set of so-called view predicate mappings. Each assertion
in Mv has the following form:
qDB(x)
v(x)
where qDB(x) is a query over the alphabet of the data sources (i.e. an SQL
query over the source database), whose free variables are in x, and v(x) is a
view predicate (not in the ontology alphabet), whose free variables are from
x.
3 http://www.optique-project.eu/
4 https://github.com/ontop/npd-benchmark
5 http://www.obdasystems.com
{ Mo constitutes the set of so-called ontology predicate mappings, that
associates atomic predicates in the ontology alphabet to conjunctive queries over
the alphabet of the views [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Assertions in Mo have the following form:
qv(x)
qv(x)
qv(x)
      </p>
      <p>C(f (y))
P (f1(y1); f2(y2))
A(f (y1); y2)
(1)
(2)
(3)
{</p>
      <p>Assertions of the form (1) are called concept mapping assertions, where qv(x)
is a conjunctive query over the views in Mv, with free variables x, y x, f
is a function term and C is an atomic concept in the ontology.</p>
      <p>Assertions of the form (2) are called role mapping assertions, where qv(x) is
a conjunctive query over the views in Mv, with free variables x, y1; y2 x,
f1 and f2 are function symbols used to build objects out of the values stored
at the data layer, and P is an atomic predicate in the ontology.
Assertions of the form (3) are called attribute mapping assertions, where
qv(x) is a conjunctive query over the views in Mv, with free variables x,
y1 x, y2 2 x, f is a function term and A is an atomic attribute in the
ontology.</p>
      <p>Furthermore, the conjunctive queries in the left-hand side of the mappings
can also express conditions over the variables in the mapping, in the form of
(in)equalities, and relational operators.</p>
      <p>is a set of data constraints over the view predicates. Data constraints
are used during query reformulation in order to reduce the size of the nal
rewriting by applying techniques that take advantage of the semantics of the
views expressed through the constraints. Such techniques are usually referred
to as semantic query optimization (SQO). Assertions in are divided into:
Key Constraints, which are assertions of the form:</p>
      <p>Key(v[i1; :::; ik])
where v is a view predicate, and i1; :::; ik is a set of pairwise distinct
integers ranging from 1 to the arity of v. Intuitively, these assertions
state that the subset of the attributes of v corresponding to the integers
i1; :::; ik is an identi er of its tuples. These constraints correspond to the
notion of primary keys in relational databases.</p>
      <p>Inclusion Constraints, which are assertions of the form:
v1[i1; :::; ik]</p>
      <p>v2[j1; :::; jk]
where v1; v2 are two distinct view predicates, i1; :::; ik is a set of pairwise
distinct integers ranging from 1 to the arity of v1, and j1; :::; jk is a set
of pairwise distinct integers ranging from 1 to the arity of v2. These
assertions state that the projection of the view v1 over the attributes
corresponding to the indexes i1; :::; ik is contained in the projection of
the view v2 over the attributes corresponding to the indexes j1; :::; jk.
Denial Constraints, which are assertions of the form:</p>
      <p>CQMv ! ?
where CQMv is a conjuntive query over the view predicates in Mv. These
assertions are used to state the query CQMv evaluates to an empty set
and can be used to remove entire sub-queries from the nal union of
conjunctive queries.</p>
      <p>
        Query answering for UCQ in Mastro is divided into four phases: (i) The rst
phase comprises the rewriting of the input UCQ according to the knowledge
expressed by the TBox of the ontology. The rewriting process, performed by
the Presto [13] algorithm, encodes the knowledge expressed by the TBox and
the user query q into a UCQ q0 so that the evaluation of q0 produces the same
results of q without taking into account axioms in the TBox. (ii) During the
second phase the UCQ over the ontology is rewritten, taking into account mapping
from Mo, through a mapping unfolding step, based on the partial evaluation
techniques described in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], in order to deal with the presence of function
symbols. The output of this phase is a UCQ expressed over the alphabet of the
views in Mv. This phase is referred to in Mastro as high-level unfolding. (iii) In
the third stage of the query reformulation, optimizations are performed, taking
into account inclusions between views, denial constraints and key constraints,
so as to minimize the reformulated query by removing redundant joins or entire
sub-queries contained into others. (iv) Finally, during the last stage of the query
reformulation the optimized UCQ is rewritten taking into account mappings
from Mv through a further unfolding step, so as to obtain an SQL query that
can be directly evaluated over the input database. This last phase is referred to
in Mastro as low-level unfolding.
      </p>
      <p>The entire reformulation process in Mastro is implemented in a parallel
approach, that is, each of the rewritings of the input UCQ is treated indipendently
in the reformulation pipeline, and the union of all the answers is performed as
the they are available to the system.</p>
      <p>The other system the we considered is Ontop6. Ontop is an open source
OBDA framework, written in Java, developed at the Free University of
BolzenBolzano and released under the terms of the Apache version 2.0 license.</p>
      <p>
        Ontop is based on theoretical foundations from [
        <xref ref-type="bibr" rid="ref1 ref10 ref11">1,10,11</xref>
        ] and supports all
the relevant W3C standards and major relational databases. Ontop supports
OWL 2 QL and RDFS as the ontology languages, SPARQL 1:0 and the OWL
2 QL entailment regime of SPARQL 1:1 for the user queries, and R2RML as
the mapping language. Additionally Ontop has its internal mapping language,
in which mappings consist of (i) a source, which is an SQL query; (ii) a target,
which is an RDF triple pattern, with placeholders from the attributes of the
source query.
      </p>
      <p>
        In Ontop, the query answering engine Quest transforms SPARQL queries over
the virtual RDF graph into SQL queries, which are executed by the relational
6 http://ontop.inf.unibz.it
database engine storing the data. The work ow of the translation is divided into
two stages: The rst stage happens during the system initialization, in which
the information contained at the intentional level of the ontology is integrated
into the mappings, generating the so-called T -mappings [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. The second stage
happens during query execution, where the input SPARQL query is decomposed
into a tree structure (referred to as the SPARQL algebra tree) and each node is
translated into an SQL expression. This second stage makes makes use of the T
mappings generated at system start-up and of the database integrity constraints.
During the translation of this intermediate representation of the query into SQL,
optimizations are applied in order to avoid redundant self-joins, sub-queries, and
joins over complex expressions [12].
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Adding R2RML Support to Mastro</title>
      <p>Support for R2RML mappings in Mastro has been added through a module
that translates from/to its internal format to/from a set of mappings expressed
in the R2RML syntax. The process of translation of an R2RML mapping into
the Mastro internal format is pretty straightforward: We associate to each di
erent logical table in the original R2RML mapping a new view predicate mapping,
where the right-hand side corresponds to the e ective SQL query of the
logical table, and for each mapping that associates this logical table to a predicate
over the ontology, we create a new ontology predicate mapping, associating to
it the corresponding view predicate. Since R2RML does not allow to express
constraints over the logical tables of the form shown in 2, no data constraint is
generated for the translated mapping. This means that e ectively, when using
R2RML as the mapping language, the system is not able to perform any
optimization on the nal rewriting, as this would require the speci cation of such
constraints by the mapping designer.</p>
      <p>On the other hand, when translating from its internal format to the R2RML
format, we face the problem of how to represent mappings expressed as
conjunctive queries over the alphabet of the view predicates. The solution we adopted is
to take the unfolding of the right-hand side of such mappings, and associate this
unfolding to a new logical table that can be used to construct the corresponding
R2RML representation of the original mapping. Also, similarly to what happens
in the opposite direction, the data constraints expressed over the view predicates
are discarded during the translation, as they have no equivalent in R2RML.</p>
      <p>The approach here presented has a pretty notable consequence: When using
R2RML as the mapping language, Mastro is not able to perform any (other
than very basic) optimizations over the produced rewriting, as it cannot take
advantage of the SQO module, which requires data constraints to be explicitly
stated in the mappings.</p>
    </sec>
    <sec id="sec-4">
      <title>Comparison on the NPD Benchmark</title>
      <p>
        The NPD Benchmark is a recent proposal [
        <xref ref-type="bibr" rid="ref3 ref5 ref6">6,3,5</xref>
        ], based on the Norvegian Petroleum
Directorate (NPD) FactPages 7, for the purpose of the evaluation of the
performance of an OBDA system in a real world scenario.
      </p>
      <p>The NPD FactPages contains information regarding the petroleum activities
on the Norwegian continental shelf. Such information is actively used by oil
companies like Statoil. The Factpages are periodically synchronized with the
NPD's databases.</p>
      <p>The NPD FactPages have been mapped to the ontology and stored in a
relational database. Together with the ontology, the benchmark is provided with a
dump of the original database created from the NPD FactPages, the set of
mappings expressed in the R2RML mapping language, and a set of queries that have
been formulated by domain experts starting from an informal set of questions
provided to the users of the NPD FactPages.</p>
      <p>The NPD Ontology [14] describes activities on the Norwegian continental
shelf (NCS), e.g., about companies that own or operate petroleum elds [14].
The ontology has been created by the University of Oslo, and presents rich
hierarchies of classes and properties, axioms that infer new objects, and disjointness
assertions.</p>
      <p>The ontology is speci ed in OWL and for the purpose of the benchmark it
has been restricted to the fragment corresponding to the OWL 2 QL pro le.
Overall is composed by about 350 concepts, 142 roles and 238 attributes, with
a maximum hierarchy depth of 10. This restriction is essential for its use in the
context of OBDA as guarantees rst-order rewritability for the class of union of
conjunctive queries.</p>
      <p>The NPD speci cation provides a set of 1173 mapping assertions,
characterized by an average of 1:7 joins per query. The mappings have been partially
bootstrapped automatically from the database and the ontology, and partially
created by hand, and are speci ed in the R2RML mapping language.</p>
      <p>The mappings have purposely not optimized, to measure the e ciency of
the optimization strategies employed by an OBDA system. This means that the
number of mappings that refer to the same ontology predicate is in general very
large, up to about 30 in some cases.</p>
      <p>The 1:9 revision of the NPD benchmark devises 30 SPARQL queries of
different complexity, de ned by domain experts starting from an informal set of
questions to the users of the NPD FactPages. Among the set of queries, some
have been speci cally generated to stress the e ciency of a system when
reasoning with respect to existential variables.</p>
      <p>Some of the characteristics of the queries are the presence of concepts with
a rich hierarchy and the presence of aggregations. For the purpose of this
experimentation, we are only interested in the subset of these SPARQL queries
corresponding to the class of union of conjunctive queries, as this is the
semantics for SPARQL queries that is supported by Mastro. The only exception is that</p>
      <sec id="sec-4-1">
        <title>7 http://factpages.npd.no/factpages/</title>
        <p>
          we make is for the use of duplicate elimination from the results. This requires
to change part of the query set (for a detailed description of each of the queries
adopted, we refer the reader to [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]).
        </p>
        <p>The original NPD databases is derived from the data published on the
Norvegian Petroleum Directorate FactPages8.</p>
        <p>The data from FactPages has been translated from CSV les into a structured
database. The generated schema consists of 70 tables with 276 distinct columns
(about 1000 columns in total), and 94 foreign keys.</p>
        <p>The schemas of the tables overlap in the sense that several attributes are
replicated in several tables. In fact, there are tables with more than 100 columns.
The total size of the initial database is about 60 MB.</p>
        <p>
          Since OBDA are expected to work in the context of Big Data, the authors of
the benchmark have provided a tool that enables the initial database instance
to be scaled in order to obtain larger instances. The scaling process,
implemented by the Virtual Instances Generator (VIG) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]9, is performed by taking
into account the axioms in the ontology, the structure of the mappings, and
the database constraints in order to preserve a set of similarity measures in the
original database.
        </p>
        <p>Starting from this initial database, instances of di erent size have been
created with the use of the VIG generator, and have been loaded into separate
databases. Table 1 shows the scaling factor and the size for each of the
generated databases that have been used in our experiment. the number of the
database represents its scale with respect to the original instance.</p>
        <p>Name Scale Factor Size
NPD1 1 60 MB
NPD10 10 710 MB
NPD50 50 2570 MB
NPD100 100 5300 MB</p>
        <p>Table 1: generated databases</p>
        <p>We ran the NPD Benchmark on both the version of Mastro 1:0:2 and
Ontop 3.0-beta210, on the same physical system using the same set of generated
databases. The underlying DBMS is MySQL version 5:7:21, running locally on
the testing machine.</p>
        <p>The speci cations of the platform used for the experiments are the following:
CPU Intel Xeon E5-2670 running at 2.60ghz
RAM 16 GB DDR3 1600 mhz</p>
      </sec>
      <sec id="sec-4-2">
        <title>8 http://factpages.npd.no/factpages/</title>
        <p>9 https://github.com/ontop/vig
10 The particular version of Ontop used is a snapshot of the development version
3.0beta2, compiled on the 17th of October 2017
OS Ubuntu 17.10 running in a virtualized environment (4 cores)</p>
        <p>The experimentation is performed in the following mode:
{ We iterate over the set of queries. at each iteration we pick a random query
from the set and evaluate it over the system. This is done in order to reduce
the e ect of the caching in the dbms.
for each execution we store the results and the time it took to complete. we
consider the combined time needed for evaluating the query and processing
the set of results. queries are executed sequentially through the use of a
testing platform designed speci cally for this task, which accesses directly
the internal apis of the systems.
{ We repeat the process until all queries have been executed a xed amount
of time, in this case 5 executions were performed.
{ Finally, we take the average of the execution times for each of the queries in
the set.</p>
        <p>In order to compare the systems under the same setting we enabled for both
reasoning with respect to existential variables. Our metric of comparison is the
total time taken to complete the execution of the query and to process the
results. A comparison of the execution times for both systems for each of the
database instance considered is shown in Figure 1.</p>
        <p>We start our analysis by looking at some of the most interesting results. In
particular, the queries where Ontop performs worse are those requiring reasoning
with respect to the existential variables. Examples of these queries are q9 and
q10, which cause the system to produce rewritings consisting of unions of tens
of sub-queries.</p>
        <p>Queries q1,q2,q3,q4,q7,q15,q16,q25 instead produce a simple SPJ rewriting,
although the di erence here is given by the fact that Ontop applies strictly the
rules speci ed by the OWL 2 standard, performing the datatype casts and the
generation of the IRIs directly at the SQL level, which causes a slowdown of
the execution. Instead, Mastro adopts a less strict approach for dealing with
datatypes, avoiding to perform casts and IRI-construction at the SQL level.</p>
        <p>As for queries q24-q25, and q28-q29, it can be noted that in this case
Mastro performs considerably slower than Ontop. This is due to the high number
of mappings for the ontology predicates involved in these queries, that have
to be unfolded by the system, and by the high number of sub-classes and
subproperties for the concepts and properties in the query, which cause the rewriting
to grow exponentially in size. In Mastro, this phenomenon is mitigated with the
addition of data constraints during the design of the views, in such a way that
this redundancy is avoided. In this case, since view are generated automatically
from the R2RML mapping, these constraints are not available to the system,
e ectively disabling all the optimizations that the system is capable of
performing. Instead, in Ontop this problem is mitigated during the o ine stage, when
the mappings and the ontology are compiled to form the so-called T -mappings,
using the database constraints to optimize the mappings.
100 q1 q2 q3 q4 q5 q7 q8 q9 q10 q15 q16 q17 q18 q19 q20 q2 q23 q24 q25 q26 q27 q28 q29</p>
        <p>Mastro QueryOntop
100 q1 q2 q3 q4 q5 q7 q8 q9 q10 q15 q16 q17 q18 q19 q20 q2 q23 q24 q25 q26 q27 q28 q29</p>
        <p>Mastro QueryOntop
(c) NPD50</p>
        <p>(d) NPD100</p>
        <p>Finally, queries q17-q19, and q26-q27 are less interesting, as they produce
empty unfoldings (due to mismatching function names in the mappings), and
their execution time does not depend on the database size. For these queries,
it can be noted that moving part of the computation to an o ine stage gives
Ontop a big advantage, as the system has to check a small amount of mappings
at query execution time.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Comparison on the ACI application</title>
      <p>The second scenario that we considered is the one currently in development
within a joint project between Sapienza University of Rome and the Italian
Automobile Club (ACI). The main objective of the project is assessing the bene ts
of the OBDA approach as a way of extracting data of interest for the ACI users.</p>
      <p>The ACI ontology comprises about 500 concepts, 200 roles and 200 attributes,
Among the most important notions in this ontology are the concept of vehicle,
characterizing also its evolution over time, through the notion of state, and the
concept of subject, modeling the possible roles played by the subjects (physical
people or organizations) with respect to the taxation concerning vehicles.</p>
      <p>The most important characteristic of this speci cation is that while the
ontology has been designed to accurately re ect the reality of the domain of interest,
the data sources are structured as to accomodate the requirements of the
applications that make use of them. This large semantic gap between the data sources
and the ontology has a large impact on the complexity of the mappings used to
map the data at the sources to the ontology.</p>
      <p>In this particular application the database is managed by an instance of the
Oracle DBMS, for which we were granted accessed remotely through the use
of a VPN. The relevant portion of the data for our experiment is distributed
across 6 schemas. These schemas are composed of hundreds of tables, but for
what regards the portion of the domain that is of interest in this experiment we
concentrate on about 90 relational tables, ranging from information regarding
the domain of PRA (Pubblico Registro Automobilistico), to those regarding the
taxation concerning the vehicles. Some of these tables count from 200 million
tuples up to above 1 billion tuples, with a number of attributes ranging from 30
to 100. The overall size of the portion of interest of the data source is several
gigabytes of data (an accurate estimate was not possible).</p>
      <p>The speci cation comprises 976 ontology mappings, composed from a set of
about 110 views over the data source. About 300 of these ontology mappings are
built from single view atoms, while the remaining are speci ed as conjunctive
queries over the view predicates. For the purpose of our experimentation the
mappings have been previously translated in R2RML through the use of the
approach described in Section 3, and then imported back into both systems. During
the translation process the constraints over the view predicates are discarded,
since they cannot be expressed in R2RML.</p>
      <p>
        We devised a set of 10 queries for our experiment (we refer the reader to [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
for a detailed description of the query set). Query q1 to q5 are basic
navigational queries, that span some of the relevant part of the ontology. The remaining
queries q6 to q10 are variations of the real queries used in the original
experimentation of the project. These queries are built from a set of competency questions,
de ned by interviewing the domain experts over the practical questions that
have to be posed to the system, and are used to validate the quality and the
coherency of the speci cation.
      </p>
      <p>We ran the queries on Mastro, version 1:0:2, and Ontop 3.0-beta211, using
the same speci cation composed by the ontology and the mappings exported in
R2RML.</p>
      <p>The speci cations of the platform used for the experiments are the same
adopted in the case of the NPD Benchmark (cf. 4). In order to compare the
systems under the same setting we enabled for both reasoning with respect to
existential variables. Our metric of comparison is the total time taken to complete
the execution of the query and to the process the results. Due to restrictions in
the amount of time we were allowed for experiments, the queries were executed
with a timeout of 3 hours. As a reference, we report also the time needed by the
11 The particular version of Ontop used is a snapshot of the development version
3.0beta2, compiled on the 17th of October 2017
Mastro system using the original mapping speci cation to evaluate the same set
of queries. Figure 2 shows the overall execution times for both systems.</p>
      <p>ACI
108
107
106
l)ca105
e
(sogLS
m
ien104
m
i
T
103
102
101
q1
q2
q3</p>
      <p>q4
Mastro</p>
      <p>q5 Query q6
Mastro R2RML
q7
q8
q9</p>
      <p>q10</p>
      <p>Ontop</p>
      <p>The rst thing we notice from our experimentation is that in the case of the
more complex queries (q6 10) Ontop was not able to complete in the time
allowed, even though both systems are using the same speci cation. By further
inspecting the generated SQL rewritings, We identi ed a few reasons for this
phenomenon: (i) One reason is that, in the case of Ontop, the entire rewriting is
executed as a single, complex SQL query, and the database management system
was not able to compute an e cient query plan for such large queries. (ii)
Another reason is that when the optimizations performed to reduce the size of the
T -mappings fail, because there may be missing database constraints, or possibly
due to the complexity of the queries in the mappings, the system produces
rewriting containing complex sub-queries, composed of unions of several SPJ queries
and these types of queries are not evaluated e ciently. (iii) Finally, having the
objects to be constructed directly at the level of the data sources, through the
use inherently poorly performing operations such as string concatenation and
type casts, is not feasible in real industrial applications. We noticed that in this
particular case little to no optimizations were applied by Ontop, which caused
it to produce rewritings where the intermediate views are composed by complex
nested unions of select-project-join queries, that are not dealt with e ciently by
the DBMS.</p>
      <p>On the other hand, the approach adopted in Mastro, of splitting the queries
in several, simpler conjunctive queries, still enabled the system to complete the
task in the time allowed, even if in this case there are no optimizations performed,
as the constraints over the views are not expressible in R2RML, which cause the
time taken by the system to increase up to almost three orders of magnitude for
the most di cult query.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Giacomo</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Tractable Reasoning and E cient Query Answering in Description Logics: The DL-Lite Family</article-title>
          .
          <source>J. Autom. Reasoning</source>
          <volume>39</volume>
          (
          <issue>3</issue>
          ),
          <volume>385</volume>
          {
          <fpage>429</fpage>
          (
          <year>2007</year>
          ). https://doi.org/10.1007/s10817- 007-9078-x, https://doi.org/10.1007/s10817-007-9078-x
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Giacomo</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Data complexity of query answering in description logics</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>195</volume>
          ,
          <issue>335</issue>
          {
          <fpage>360</fpage>
          (
          <year>2013</year>
          ). https://doi.org/10.1016/j.artint.
          <year>2012</year>
          .
          <volume>10</volume>
          .003, https://doi.org/10.1016/ j.artint.
          <year>2012</year>
          .
          <volume>10</volume>
          .003
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lanti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rezk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Slusnys</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
          </string-name>
          , G.:
          <article-title>A scalable benchmark for OBDA systems: Preliminary report</article-title>
          .
          <source>In: Informal Proceedings of the 3rd International Workshop on OWL Reasoner Evaluation (ORE</source>
          <year>2014</year>
          )
          <article-title>co-located with the Vienna Summer of Logic (VSL</article-title>
          <year>2014</year>
          ), Vienna, Austria, July
          <volume>13</volume>
          ,
          <year>2014</year>
          . pp.
          <volume>36</volume>
          {
          <issue>43</issue>
          (
          <year>2014</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>1207</volume>
          /paper_5.pdf
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Console</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mora</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santarelli</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Savo</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          :
          <article-title>E ective computation of maximal sound approximations of description logic ontologies</article-title>
          .
          <source>In: The Semantic Web - ISWC 2014 - 13th International Semantic Web Conference, Riva del Garda, Italy, October 19-23</source>
          ,
          <year>2014</year>
          . Proceedings, Part II. pp.
          <volume>164</volume>
          {
          <issue>179</issue>
          (
          <year>2014</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -11915-1 11, https://doi.org/10. 1007/978-3-
          <fpage>319</fpage>
          -11915-1_
          <fpage>11</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lanti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rezk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Slusnys</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The NPD benchmark for OBDA systems</article-title>
          .
          <source>In: Proceedings of the 10th International Workshop on Scalable Semantic Web Knowledge Base Systems co-located with 13th International Semantic Web Conference (ISWC</source>
          <year>2014</year>
          ),
          <source>Riva del Garda</source>
          , Italy, October
          <volume>20</volume>
          ,
          <year>2014</year>
          . pp.
          <volume>3</volume>
          {
          <issue>18</issue>
          (
          <year>2014</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>1261</volume>
          /SSWS2014_paper1.pdf
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Lanti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rezk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The NPD Benchmark: Reality Check for OBDA Systems</article-title>
          .
          <source>In: Proceedings of the 18th International Conference on Extending Database Technology, EDBT</source>
          <year>2015</year>
          , Brussels, Belgium, March
          <volume>23</volume>
          - 27,
          <year>2015</year>
          . pp.
          <volume>617</volume>
          {
          <issue>628</issue>
          (
          <year>2015</year>
          ). https://doi.org/10.5441/002/edbt.
          <year>2015</year>
          .
          <volume>62</volume>
          , https: //doi.org/10.5441/002/edbt.
          <year>2015</year>
          .62
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lanti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Data scaling in OBDA benchmarks: The VIG approach</article-title>
          .
          <source>CoRR abs/1607</source>
          .06343 (
          <year>2016</year>
          ), http://arxiv.org/abs/1607.06343
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Namici</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>R2RML mappings in OBDA systems: Enabling comparison among OBDA tools</article-title>
          . CoRR abs/
          <year>1804</year>
          .01405 (
          <year>2018</year>
          ), http://arxiv.org/abs/
          <year>1804</year>
          . 01405
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>F.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mancini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Poggi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruzzi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Savo</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          :
          <article-title>Optimizing query rewriting in ontology-based data access</article-title>
          .
          <source>In: Joint</source>
          <year>2013</year>
          EDBT/ICDT Conferences,
          <source>EDBT '13 Proceedings, Genoa, Italy, March</source>
          <volume>18</volume>
          - 22,
          <year>2013</year>
          . pp.
          <volume>561</volume>
          {
          <issue>572</issue>
          (
          <year>2013</year>
          ). https://doi.org/10.1145/2452376.2452441, http:// doi.acm.
          <source>org/10</source>
          .1145/2452376.2452441
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Poggi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Giacomo</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
          </string-name>
          , R.:
          <article-title>Linking Data to Ontologies</article-title>
          .
          <source>J. Data Semantics</source>
          <volume>10</volume>
          ,
          <issue>133</issue>
          {
          <fpage>173</fpage>
          (
          <year>2008</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>540</fpage>
          -77688-8 5, https://doi.org/10.1007/ 978-3-
          <fpage>540</fpage>
          -77688-
          <issue>8</issue>
          _
          <fpage>5</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Ontology-Based Data Access: Ontop of Databases</article-title>
          .
          <source>In: The Semantic Web - ISWC 2013 - 12th International Semantic Web Conference</source>
          , Sydney,
          <string-name>
            <surname>NSW</surname>
          </string-name>
          , Australia,
          <source>October 21-25</source>
          ,
          <year>2013</year>
          , Proceedings, Part I. pp.
          <volume>558</volume>
          {
          <issue>573</issue>
          (
          <year>2013</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -41335- 3 35, https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -41335-3_
          <fpage>35</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>