<!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 />
    <article-meta>
      <title-group>
        <article-title>Heuristics for Applying Cached OBDA Rewritings</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andreas Nakkerud</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Evgenij Thorstensen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Informatics, University of Oslo</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In OBDA systems, cached rewritings can be used to signi cantly shorten the process of nding rewritings of bigger queries. The main challenge in using cached rewritings is nding the optimal combination to apply, a problem which is NP-complete. In this paper, we present a way to calculate the value of a cached rewriting, and propose using this value to decide which cached rewritings to apply. The idea behind our technique is to estimate how much computation, in particular optimization, has gone into the rewriting. This can tell us something about which cached rewritings we should prioritise, and also when to cache a rewriting. In order to quantify optimization, we de ne a measure of UCQs, and calculate this measure at di erent stages of the rewriting.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Ontology-based data access (OBDA) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] is a recent paradigm for accessing
data sources through an ontology that acts as a conceptual, integrated view of
the data. The data sources are connected to the ontology via mappings that
specify how to retrieve the appropriate data from the sources. The framework of
OBDA has received a lot of attention in the last years: many theoretical studies
have paved the way for the construction of OBDA systems (e.g., [
        <xref ref-type="bibr" rid="ref13 ref3 ref5">3, 5, 13</xref>
        ]) and
the development of OBDA projects for enterprise data management in various
domains [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        The usual way of answering a query over the ontology in the OBDA
framework [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] is to transform it into a set of queries to be executed over the
data sources. This process is computationally expensive, as it requires logical
reasoning over knowledge represented in the ontology (rewriting) followed by
the application of mappings to the ontological query (unfolding). Furthermore,
as the resulting set of queries is likely to contain redundancies, optimization
techniques are typically applied along the way [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. It therefore makes sense to
cache the results of a query rewriting and unfolding, in the hope of using them
to speed up the answering of future queries [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. However, the problem of nding
the cached rewritings to use is itself hard, as it is a variant of the well-known
problem of query answering using views [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In particular, checking whether a
cached rewriting can be applied to a query is in general NP-complete.
      </p>
      <p>In this paper, we therefore study the following problem: Given a query Q
to answer and a set of cached rewritings of previous queries, how useful is each
cached rewriting likely to be, if it is applicable to Q? Knowing this, the system
can make sensible decisions as to which cached rewritings to try and apply, and
in what order.</p>
      <p>
        As a measure of the usefulness of an existing cached rewriting, previous work
by Di Pinto et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] use the number of atoms in the queries. This approach
does not take into account the details of the rewriting algorithm used, nor the
speci cation of the OBDA system the queries are answered over. In order to
get a ner picture of the usefulness of a cached rewriting, we de ne a measure
for UCQs, and apply it to an intermediate stage of the rewriting. We then use
this measure, as well as measures of the cached rewriting, to de ne a heuristic.
In addition to analysing the queries of a cached rewriting directly, this heuristic
also takes into account how ontology queries are rewritten by the OBDA system.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>In this section, we de ne basic notions related to OBDA systems and their
components: databases, ontologies, and mappings. We then give a de nition of
query rewriting and unfolding, followed by a formal de nition of cached query
rewritings as mappings that possess speci c properties.
2.1</p>
      <sec id="sec-2-1">
        <title>Databases</title>
        <p>
          In this paper, we assume a xed relational schema S, and adopt the standard
notions for conjunctive queries (CQs) over S [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. To every conjunctive query CQ
we associate a measure of its size, denoted by size(CQ). There are several ways
to measure the size of a conjunctive query; we will discuss using the number of
atoms or the number of variables in the query. However, it is possible to also use
more advanced measures of query size, such as tree and hypertree width [
          <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
          ].
        </p>
        <p>Given a conjunctive query Q and a tuple of constants t, we write Q[t] for
the query obtained by replacing the free variables of Q with the constants in t.
Given a database instance D and a query Q, we write ans(Q; D) for the set of
answers to Q over D, de ned in the standard way.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Ontologies</title>
        <p>An ontology is a description of a domain of interest in some formal language.
Here, we consider the languages of Description Logics (DLs). In general, an
ontology expressed in a description logic is a pair O = hT ; Ai, where the TBox
T contains axioms specifying universal properties of the concepts and roles in
the domain, while the ABox A speci es instances of concepts and roles. In the
OBDA setting, the ABox is given by mappings rather than explicitly, and so the
TBox is the only relevant component. We therefore set O = T .</p>
        <p>
          In the examples discussed in this paper, we will use the description logic
DL-LiteA [
          <xref ref-type="bibr" rid="ref12 ref4">4, 12</xref>
          ]. The syntax of DL-LiteA is based on concepts, value-domains,
roles, and attributes, and can be de ned using the following grammar [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]:
B ! A j 9Q j (UC )
C ! B j :B
Q ! P j P
R ! Q j :Q;
        </p>
        <p>E !</p>
        <p>(U )
F ! T1 j : : : j Tn
V ! U j :U
where A is a concept name, P is a role name, U is an attribute name, and
T1; : : : ; Tn are value-domains. We let O be a set of ontology predicates, and</p>
        <p>C a set of constants. The semantics of DL-LiteA is de ned in terms of
rstorder interpretations I = ( I ; I ) over O [ C . The non-empty domain I
is the union of the disjoint sets V and IO, where V is the domain for
interpreting data values, and IO is the domain for interpreting object constants.
The interpretation function I is de ned as follows:</p>
        <p>AI
P I
U I</p>
        <p>I
O
I
O
I
O</p>
        <p>I
O</p>
        <p>V
(:B)I =</p>
        <p>IO n BI
(:Q)I = ( IO</p>
        <p>IO) n QI
(:U )I = ( IO</p>
        <p>V ) n U I
(P )I = f(o; o0) j 9v:[(o0; o) 2 P I ]g
(9Q)I = fo j 9o0:[(o; o0) 2 QI ]g
( (U ))I = fo j 9v:[(o; v) 2 U I ]g
( (U ))I = fv j 9o:[(o; v) 2 U I ]g:
A DL-LiteA TBox T is a nite set of axioms of the form</p>
        <p>B v C</p>
        <p>Q v R</p>
        <p>E v F</p>
        <p>U v V
(funct Q)
(funct U ):
The interpretation I satis es an axiom X v Y if XI Y I . I satis es (funct Z)
if for every o; o0; o00 2 IO, if (o; o0) 2 ZI and (o; o00) 2 ZI , then o0 = o00.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Mappings</title>
        <p>
          In the general case, a mapping assertion m between a database schema S and
an ontology O has the form Q q, where the body Q is a CQ over S, and the
head q a CQ over the vocabulary of O [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], possibly with shared free variables.
To de ne the semantics of mapping assertions, we rst need to de ne the notion
of an OBDA system.
2.4
        </p>
      </sec>
      <sec id="sec-2-4">
        <title>OBDA systems</title>
        <p>An OBDA system speci cation is a triple B = hO; S; Mi where S is a database
schema, M a set of mapping assertions, and O an ontology. The semantics
of query answering in OBDA systems are usually de ned using rst-order
interpretations.</p>
        <p>De nition 1 (OBDA semantics). Let B = hO; S; Mi be an OBDA system
speci cation, and D a database for S. A rst order interpretation I with I j= D
is a model for B if
{ I j= O, and
{ for every tuple of constants t from D, and every mapping assertion
Q q 2 M, we have that I j= q[t] whenever I j= Q[t].</p>
        <p>The set of answers to a query q over B and D is the set of tuples t from D
such that q[t] is true in every model of B and D. We write ans(q; B; D) for the
answers to q over B and D.</p>
        <p>As mentioned in the introduction, answering a query in an OBDA system
is usually done by rewriting and unfolding the query into the correct database
queries to execute.</p>
        <p>De nition 2 (Rewriting and unfolding). Let B = hO; S; Mi be an OBDA
system speci cation, and q a CQ over the vocabulary of O. A rewriting of q
under B is a query q0 over the same vocabulary such that ans(q0; h;; S; Mi; D) =
ans(q; B; D) for every database instance D.</p>
        <p>An unfolding of the rewriting q0 of q is a query Q over S such that
ans(Q; D) = ans(q; B; D) for every database instance D.</p>
        <p>We can now de ne the notion of a perfect mapping assertion, which captures
the idea of caching the rewriting and unfolding of a query.</p>
        <p>
          De nition 3 (Perfect mapping assertion [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]). Let B = hO; S; Mi be an
OBDA system speci cation. A mapping assertion Q q is a perfect mapping
assertion if for every database instance D, we have ans(q; B; D) = ans(Q; D).
        </p>
        <p>
          Each cached rewriting and unfolding is a perfect mapping assertion. In
fact, caching is one of the primary methods for obtaining perfect mapping
assertions [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Applying Perfect Mapping Assertions</title>
      <p>
        As part of their full OBDA rewriting algorithm, Di Pinto et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] present
the algorithm ReplaceSubqueryR for applying a perfect mapping assertion
before the regular rewriting procedure starts. Using the notion of restricted
homomorphisms, they give an exact de nition of when a perfect mapping
assertion can be applied.
      </p>
      <p>
        Given a conjunctive query q, ReplaceSubqueryR goes through the perfect
mapping assertions in the order speci ed by some heuristic, modifying q
whenever the perfect mapping assertion is applicable. The order of application
is signi cant, since the application of one perfect mapping assertion can prohibit
the subsequent application of another. Finding the optimal combination of
perfect mapping assertions to apply is NP-hard [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Di Pinto et al. use a greedy
strategy. The heuristic for this strategy is the number of atoms in the heads of
the perfect mapping assertions.
      </p>
      <p>Our goal is to de ne an improved heuristic for the order of application of
perfect mapping assertions.</p>
      <p>The following example, based on one of the challenges faced by the Optique
project1, shows how we create perfect mapping assertions.</p>
      <p>Example 4. Let company(name; owner; manager; accountant) be a database
table. We de ne the concepts Company and Owner, M anager and Accountant,
and the roles hasOwner, hasM anager, and hasAccountant. We de ne the
TBox,
9hasOwner v Company;9</p>
      <p>&gt;
9hasM anager v Company;= ;
&gt;: 9hasAccountant v Company ;&gt;
and mapping assertions
8&gt; 9y; z; w:company(x; y; z; w)
&gt;&gt; 9z; w:company(x; y; z; w)
M = &lt;
&gt; 9y; w:company(x; y; z; w)
&gt;
&gt;
:
9y; z:company(x; y; z; w)</p>
      <p>Company(x)
hasOwner(x; y)
hasM anager(x; z)
&gt;
&gt;
hasAccountant(x; w);&gt;
9
&gt;
&gt;
&gt;
= :</p>
      <p>We now look at the query q(x) = Company(x). The ontology rewriting of
Company(x) is
q0(x) = Company(x) _ 9v:hasOwner(x; y)</p>
      <p>_ 9v:hasM anager(x; y) _ 9v:hasAccountant(x; y):
When unfolding q0(x) we get the UCQ
which is obviously equivalent to
9y; z; w:company(x; y; z; w)
_ 9v; z; w:company(x; v; z; w)
_ 9y; v; w:company(x; y; v; w)
_ 9y; z; v:company(x; y; z; v);
9y; z; w:company(x; y; z; w):
We cache this rewriting by saving the perfect mapping assertion
9y; z; w:company(x; y; z; w)</p>
      <p>Company(x):</p>
      <p>
        Example 4 illustrates one situation where perfect mapping assertions are
useful. An alternative way of dealing with his particular example is by modifying
the set M of mapping assertions according to the TBox [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], and then to optimise
it [
        <xref ref-type="bibr" rid="ref13 ref9">9, 13</xref>
        ]. This approach is not as general as the perfect mapping assertion
approach, because it only works when there are redundancies in the mapping
assertions. The perfect mapping assertions can represent optimisations that are
only valid in special cases.
1 http://optique-project.eu/
      </p>
    </sec>
    <sec id="sec-4">
      <title>Query Measure</title>
      <p>In order to evaluate the quality of a perfect mapping assertion, we need some
way of measuring a UCQ. We will use this measure to quantify the amount of
optimization that has gone into creating a perfect mapping assertion.</p>
      <p>There are several ways to measure the size of a conjunctive query. For ease
of exposition, we will use the number of atoms in the query in our examples,
although the number of variables is usually more relevant to the exact cost of
optimising a query, since query optimisation amounts to nding homomorphisms
between queries. If the number of variables is approximately linear in the number
of atoms, the results of using either will be similar.</p>
      <p>Furthermore, the number of atoms in each conjunction of the unfolding of a
conjunctive query can be approximated from the number of mapping assertions
that mentions conjunct. On the other hand, nding the number of variables
requires an analysis of each mapping assertion.</p>
      <p>The size of a UCQ is harder to describe with a single number, because UCQs
have two dimensions: the conjunctions and the conjuncts in them.
De nition 5 (Measure of UCQs). Let Q = CQ1 _ : : : _ CQk be a UCQ,
size(CQi) the size (e.g. number of atoms) of CQi, and f a weighting function.
De ne g(x) = x if f is at most linear, and g = f 1 otherwise. The measure of
Q is</p>
      <p>SQ = g
k !
X f (size(CQi)) :
i=1</p>
      <p>The function f de nes how SQ depends on the size of the conjunctive queries,
the function g makes SQ at most linear in the sum of the sizes. Our choice of
g will make SQ of the order O(k maxi[size(CQi)]), where, and k is the number
of conjunctive queries in the UCQ. We choose f according to the following
observations.</p>
      <p>{ f constant: We disregard the size of disjuncts. The cost of performing
optimizations is assumed to be insigni cant compared to the cost of
rewriting, unfolding and storing the query.
{ f linear: The cost of optimization is assumed to be on the same order as
the cost of rewriting, unfolding and storing the query.
{ f polynomial or exponential: The cost of optimization is assumed to be
more important than the cost of rewriting, unfolding and storing the query.</p>
      <p>The above list is explains how di erent de nitions of f a ects the measure
SQ. It gives a strong indication of how we should de ne f , depending on what
we want to use the measure SQ for. In Sections 5 and 6, we will use linear f . We
get back to the choice of f brie y in Section 7.</p>
    </sec>
    <sec id="sec-5">
      <title>Maximal expansion</title>
      <p>Having de ned a measure for UCQs, we are now in a position to assign a value
to the body Q of a perfect mapping assertion Q q. Such an analysis gives
us some information about how much we stand to gain by applying this perfect
mapping assertion. We can, however, get an even better picture by looking at
the process of rewriting q. Doing this, we can get a measure of how complex q
really is in the relevant OBDA system.</p>
      <p>De nition 6 (Maximal expansion). Let q be a query, B = hO; S; Mi an
OBDA system speci cation, and R an ontology rewriting algorithm. The
maximal expansion of q over B and R, denoted me(q; B; R), is the unoptimised
ontology rewriting and unfolding of q over B using R.</p>
      <p>We write me(q; B) when the choice of R is clear from the context. When
the OBDA system is also understood from the context, we let Sme(q) denote the
measure of me(q; B). The following example shows how we calculate Sme(q).
Example 7. We look at an OBDA system speci cation with TBox axioms
A v 9R and S v T , and the mapping</p>
      <p>M =
8 QA1
&gt;
&gt;&gt;&lt; QR1
&gt; QS1
&gt;
&gt;: QT1</p>
      <p>A; QA2
R; QR2
S; QS2
T; QT2</p>
      <p>A; QA3
R; QR3
S;
T; QT3</p>
      <p>A;</p>
      <p>R; QR4
T
9
&gt;
R;&gt;=&gt;
&gt;
&gt;
&gt;
;
and rewrite the query q(x; y) = 9z:R(x; z) ^ T (x; y). The ontology rewriting of
q according to rewriting algorithm R is
q0(x; y) = [9z:R(x; z) ^ T (x; y)] _ [9z:R(x; z) ^ S(x; y)]</p>
      <p>_ [A(x) ^ T (x; y)] _ [A(x) ^ S(x; y)]
We choose f (x) = g(x) = x, let size(CQ) be the number of atoms in CQ, and
calculate Sme(q). If each QXn is a query without joins, then the resulting maximal
expansion is a UCQ with joins of size 2. The rst disjunct in q0 is unfolded into
12 conjunctive queries of size 2, since there are four queries mapped to R and
3 to T . We do similar calculations with each disjunct of q0, and end up with a
total of 35 conjunctive queries, each of size 2. Therefore Sme(q) = 70.</p>
      <p>In Example 7, we assumed that there were no con icts between mapping
assertions during the unfolding. Such con icts can arise when there the mapping
assertions contain constants in place of some variables. In this case, only those
mapping assertions that have constants replacing the same variables can create
con ict, and this will usually only be the case for a very few combinations of
assertions. If constants are common in the used mapping assertions, then greater
care must be taken when using approximations of Sme(q).</p>
    </sec>
    <sec id="sec-6">
      <title>Heuristic</title>
      <p>
        With a measure for UCQs and the notion of maximal expansions, we are now
in a position to expand on the heuristic suggested by Di Pinto et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. We
design a heuristic where large values are better. In the following we assume a
xed OBDA system and ontology rewriting algorithm.
      </p>
      <p>For a perfect mapping assertion Q q, we calculate the measures Sq,
SQ and Sme(q). Note that Sq = size(q), since q is a conjunctive query.During
both ontology rewriting and unfolding, the size of a conjunctive query can
grow exponentially. In both cases there is generally multiple options for dealing
with every conjunct, and the result is a very large UCQ. For this reason, we
will use log SQ and log Sme(q), since they will be approximately proportional
to Sq. We also calculate the ratio log Sme(q)= log SQ, which tells us how much
optimisation has gone into the creation of the perfect mapping assertion. We
use this optimization ratio to adjust other measures of the value of the perfect
mapping assertion.</p>
      <p>If Sq is large for a perfect mapping assertion Q q, that is, the size of
q is large, then applying it cuts a large portion of the original query. There
is, however, a risk that this portion could be rewritten directly without much
di culty. In order to compensate for this e ect, we scale Sq by the optimisation
ratio log Sme(q)= log SQ.</p>
      <p>A perfect mapping assertion is also valuable if the corresponding Sme(q) is
large, no matter the size of Sq. Again, we scale log Sme(q) by the optimisation
ratio log Sme(q)= log SQ.</p>
      <p>Assigning a weight parameter to each of these compound measures, we get
the heuristic
a
(log Sme(q))2
log SQ
+ b Sq log Sme(q) + cSq</p>
      <p>log SQ</p>
      <p>We assume Sq, log SQ and log Sme(q) have the same units, since they are all
approximately linear in the size of the head q of the perfect mapping assertion
Q q. Then, the unit of each term in the above sum is the same, and also
approximately linear in the size(q). This means that the ratio between the terms
will be fairly stable in respect to typical query size, and as such, the tuning of
the parameters a, b, and c will not be very sensitive to the typical query size.
Example 8. We look at an ontology with an empty TBox, and the four roles R1,
R2, R3, and R4. We de ne the set of mapping assertions</p>
      <p>j
M = fQi</p>
      <p>Ri j j = 1; : : : ; i2g;
where i = 1; : : : ; 4. We let size(CQ) be the number of atoms in CQ, and assume
that each Qij is atomic. We let f (x) = x, and calculate Sq and Sme(q) for di erent
conjunctions of Ri, with each role occurring at most once in each query. The
results are shown in Table 1. We see that Sme(q) gives us a much ner division
than Sq, which only divides the queries into 3 groups. Given the query</p>
      <p>R1(x1; x2) ^ R2(x2; x3) ^ R3(x3; x4) ^ R4(x4; x5);
and the perfect mapping assertions
there is a good chance that our best option is to apply the second, shorter perfect
mapping assertion, because the maximal expansion of R3(x3; x4) ^ R4(x4; x5) is
so large. In order to be more precise, we would need to obtain the measures SQA
and SQB .</p>
      <p>R1 R1 R1 R2</p>
      <p>R1 R1 R1 R2 R2 R3 R2 R2 R3 R3
q R1 R2 R3 R4 R2 R3 R4 R3 R4 R4 R3 R4 R4 R4</p>
      <p>Sq 1 1 1 1 2 2 2 2 2 2 3 3 3 3</p>
      <p>
        Sme(q) 1 4 9 16 8 18 32 72 128 288 108 192 432 1728
Di Pinto et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] have found that using cached rewritings can signi cantly
reduce the cost of answering queries. Their well performing algorithm,
ReplaceSubqueryR, relies on a heuristic for determining the order in which to
apply cached rewritings. Di Pinto et al. have chosen a simple heuristic based
on the sizes of the heads of the cached rewritings. This is a good choice if all
subqueries have approximately the same complexity when seen together with
the TBox and the mapping. If some ontology predicates are easier to rewrite
and unfold than others, then the measures of the maximal expansion Sme(q) and
the optimised rewriting SQ become relevant to the choice of cached rewriting.
      </p>
      <p>We suggest the heuristic
a
(log Sme(q))2 + b Sq log Sme(q) + cSq</p>
      <p>log SQ log SQ</p>
      <p>
        If we let a = b = 0, c 6= 0, and de ne size(CQ) to be the number of atoms in
CQ, then our heuristic becomes the same as the one used in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. By tweaking
f in De nition 5, and the parameters a, b and c, we can shift importance away
from Sq, and towards maximal expansion Sme(q) and optimisation SQ. The ideal
setup will depend on the OBDA system speci cation, and should be decided
experimentally. For the heuristic presented here to be more accurate than the
one in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], the OBDA system speci cation needs to be uneven in terms of how
each ontology predicate is rewritten. If the mapping has very many assertions
for some ontology predicates and few for others, or if some ontology predicates
occur often in the TBox while others don't, then the count of predicates in a
query need not re ect how it behaves during rewriting. Also, if the mapping is
very large, the optimisation ratios are more likely to be signi cant, since the
unfolding and subsequent optimisation will be a large part of query rewriting.
      </p>
      <p>
        Since Sq, Sme(q), and SQ are relatively cheap to calculate or approximate
during rewriting, and cheap to store in a cache, we claim our suggested heuristic,
in many settings, will outperform the simpler heuristic provided by [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Even
when the simple heuristic performs very well, we can let a = 0 and b c, so
that Sme(q) is used for a ne splitting as illustrated by Example 8.
8
      </p>
    </sec>
    <sec id="sec-7">
      <title>Future Work</title>
      <p>We plan to continue this work by experimentally verifying our results. In
particular, we would like to compare the di erent weighting and scaling functions
discussed here on real-world datasets. Another line of enquiry would be to see
how well these heuristics can substitute for e.g. techniques to eliminate mapping
redundancy, as discussed in Section 3.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Serge</surname>
            <given-names>Abiteboul</given-names>
          </string-name>
          , Richard Hull, and
          <string-name>
            <given-names>Victor</given-names>
            <surname>Vianu</surname>
          </string-name>
          .
          <source>Foundations of Databases. Addison-Wesley</source>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Natalia</given-names>
            <surname>Antonioli</surname>
          </string-name>
          , Francesco Castano, Cristina Civili, Spartaco Coletta, Stefano Grossi, Domenico Lembo, Maurizio Lenzerini, Antonella Poggi, Domenico Fabio Savo, and
          <string-name>
            <given-names>Emanuela</given-names>
            <surname>Virardi</surname>
          </string-name>
          .
          <article-title>Ontology-based data access: the experience at the Italian Department of Treasury</article-title>
          . volume
          <volume>1017</volume>
          , pages
          <fpage>9</fpage>
          {
          <fpage>16</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Giese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Haase</surname>
          </string-name>
          , I. Horrocks,
          <string-name>
            <given-names>T.</given-names>
            <surname>Hubauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Ioannidis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Jimenez-Ruiz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Kharlamov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kllapi</surname>
          </string-name>
          , J. Kluwer, M. Koubarakis,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lamparter</surname>
          </string-name>
          , R. Moller, C. Neuenstadt,
          <string-name>
            <given-names>T.</given-names>
            <surname>Nordtveit</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O</given-names>
            <surname></surname>
          </string-name>
          . Ozcep, M. RodriguezMuro,
          <string-name>
            <given-names>M.</given-names>
            <surname>Roshchin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Savo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Soylu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Waaler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Zheleznyakov</surname>
          </string-name>
          .
          <article-title>Optique: OBDA solution for big data</article-title>
          .
          <source>In Revised Selected Papers of ESWC 2013 Satellite Events</source>
          , volume
          <volume>7955</volume>
          <source>of LNCS</source>
          , pages
          <volume>293</volume>
          {
          <fpage>295</fpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, and
          <string-name>
            <given-names>Riccardo</given-names>
            <surname>Rosati</surname>
          </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>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Cristina</given-names>
            <surname>Civili</surname>
          </string-name>
          , Marco Console, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, Lorenzo Lepore, Riccardo Mancini, Antonella Poggi, Riccardo Rosati, Marco Ruzzi, Valerio Santarelli, and
          <article-title>Domenico Fabio Savo</article-title>
          . MASTRO STUDIO:
          <article-title>Managing ontology-based data access applications</article-title>
          .
          <source>PVLDB</source>
          ,
          <volume>6</volume>
          :
          <fpage>1314</fpage>
          {
          <fpage>1317</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Georg</given-names>
            <surname>Gottlob</surname>
          </string-name>
          , Nicola Leone, and
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Scarcello</surname>
          </string-name>
          .
          <article-title>Hypertree decompositions and tractable queries</article-title>
          .
          <source>Journal of Computer and System Sciences</source>
          ,
          <volume>64</volume>
          (
          <issue>3</issue>
          ):
          <volume>579</volume>
          {
          <fpage>627</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Georg</given-names>
            <surname>Gottlob</surname>
          </string-name>
          , Reinhard Pichler, and
          <string-name>
            <given-names>Fang</given-names>
            <surname>Wei</surname>
          </string-name>
          .
          <article-title>Tractable database design through bounded treewidth</article-title>
          .
          <source>In Proceedings of the 25th ACM SIGACT-SIGMODSIGART Symposium on Principles of Database Systems (PODS'06)</source>
          , pages
          <fpage>124</fpage>
          {
          <fpage>133</fpage>
          . ACM,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Alon</surname>
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Halevy</surname>
          </string-name>
          .
          <article-title>Answering queries using views: A survey</article-title>
          .
          <source>The VLDB Journal</source>
          ,
          <volume>10</volume>
          (
          <issue>4</issue>
          ):
          <volume>270</volume>
          {
          <fpage>294</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Domenico</given-names>
            <surname>Lembo</surname>
          </string-name>
          , Jose Mora, Riccardo Rosati, Domenico Fabio Savo, and
          <string-name>
            <given-names>Evgenij</given-names>
            <surname>Thorstensen</surname>
          </string-name>
          .
          <article-title>Towards mapping analysis in ontology-based data access</article-title>
          . In Roman Kontchakov and
          <string-name>
            <surname>Marie-Laure</surname>
            <given-names>Mugnier</given-names>
          </string-name>
          , editors,
          <source>Web Reasoning and Rule Systems - 8th International Conference, RR 2014</source>
          , Athens, Greece,
          <source>September 15-17</source>
          ,
          <year>2014</year>
          . Proceedings, volume
          <volume>8741</volume>
          of Lecture Notes in Computer Science, pages
          <volume>108</volume>
          {
          <fpage>123</fpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. Floriana Di Pinto, Domenico Lembo, Maurizio Lenzerini, Riccardo Mancini, Antonella Poggi, Riccardo Rosati, Marco Ruzzi, and Domenico Fabio Savo.
          <article-title>Optimizing query rewriting in ontology-based data access</article-title>
          . In Giovanna Guerrini and Norman W. Paton, editors,
          <source>Joint 2013 EDBT/ICDT Conferences, EDBT '13 Proceedings, Genoa, Italy, March</source>
          <volume>18</volume>
          -22,
          <year>2013</year>
          , pages
          <fpage>561</fpage>
          {
          <fpage>572</fpage>
          . ACM,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Antonella</surname>
            <given-names>Poggi</given-names>
          </string-name>
          , Domenico Lembo, Diego Calvanese, Giuseppe Giacomo, Maurizio Lenzerini, and
          <string-name>
            <given-names>Riccardo</given-names>
            <surname>Rosati</surname>
          </string-name>
          .
          <article-title>Linking data to ontologies</article-title>
          . In Stefano Spaccapietra, editor,
          <source>Journal on Data Semantics X, volume 4900 of Lecture Notes in Computer Science</source>
          , pages
          <volume>133</volume>
          {
          <fpage>173</fpage>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Antonella</surname>
            <given-names>Poggi</given-names>
          </string-name>
          , Domenico Lembo, Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and
          <string-name>
            <given-names>Riccardo</given-names>
            <surname>Rosati</surname>
          </string-name>
          .
          <article-title>Linking data to ontologies</article-title>
          .
          <source>J. Data Semantics</source>
          ,
          <volume>10</volume>
          :
          <fpage>133</fpage>
          {
          <fpage>173</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Mariano</surname>
            Rodriguez-Muro,
            <given-names>Roman</given-names>
          </string-name>
          <string-name>
            <surname>Kontchakov</surname>
            , and
            <given-names>Michael</given-names>
          </string-name>
          <string-name>
            <surname>Zakharyaschev</surname>
          </string-name>
          .
          <article-title>Ontology-based data access: Ontop of databases</article-title>
          . In Harith Alani, Lalana Kagal, Achille Fokoue, Paul T. Groth, Chris Biemann, Josiane Xavier Parreira, Lora Aroyo, Natasha F. Noy, Chris Welty, and Krzysztof Janowicz, editors,
          <source>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,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , pages
          <volume>558</volume>
          {
          <fpage>573</fpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>