<!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>Unique Solutions in Data Exchange under sts Mappings</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nhung Ngo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Enrico Franconi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>KRDB Research Centre Free University of Bozen-Bolzano</institution>
          ,
          <addr-line>Italy lastname @inf.unibz.it</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>In classical data exchange, multiple solutions may appear and inherently cause many problems. To tackle the problem, one may use a richer language for schema mapping to have a unique solution. Therefore, in the paper, we consider a data exchange setting in which schema mapping contains a set of source-to-target dependencies and a set of targetto-source dependencies (sts mappings). Under the setting, we rst study the problem of deciding whether a data exchange setting has a unique solution with respect to a source instance. We show that the problem is as hard as Unique SAT problem and provide some restricted cases where the problem is tractable. Besides, we consider a more general problem that aims to check if a data exchange setting guarantees unique solutions for arbitrary source instances. While the problem is undecidable in general, we still can characterise some fragments where the problem is decidable and complete for some complexity class.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Data exchange as a theoretical problem was introduced a decade ago in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
and has been one of the most active research topics in foundation of databases
due to the need for the exchange of data in many business applications. This is
the problem of transforming data structured under a source schema into data
structured under a target schema. Given a source instance, the purpose of data
exchange is to materialise a valid target instance (called a solution) respecting
the schema mapping, speci cations that describe the relationship between data
in the two heterogeneous schemas { the source and the target.
      </p>
      <p>Classically, schema mappings in data exchange are written as source-to-target
tuple generating dependencies (s-t tgds) to specify that if some positive patterns
hold in the source, then some corresponding positive patterns must hold in the
target as well. Source-to-target tuple generating dependencies are existential
rules with positive conjunctive body and positive conjunctive head; the head may
contain existentially quanti ed variables. Under a s-t tgds mapping, there might
be more than one solution corresponding to a given source database because
the target instances might contain additional facts or unknown facts. That is,
the target database is actually an incomplete database, in the sense of classical
database theory, namely it is a set of possible databases. This leads to a mismatch
between the purpose of data exchange-materialising a valid target database and
its speci cations-generating multiple valid instances.</p>
      <p>
        After data is exchanged and a target instance is generated, one may want to
do query answering the target data. As a consequence of incomplete database,
the problem is complex and non-intuitive for general (non-positive) relational
or aggregate queries, since it is basically comparable to entailment with
openworld semantics (namely the computation of certain answers ), and standard
relational database technologies can not be used. Anomalies caused by certain
answer semantics are mentioned in [
        <xref ref-type="bibr" rid="ref1 ref10 ref12 ref2">2,10,1,12</xref>
        ], and nicely summarised by [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]
thought a set of examples.
      </p>
      <p>
        In order to solve the query answering problem, the classical data exchange
framework restricts the target query language to just monotone queries (i.e.,
positive queries or union of conjunctive queries). It turns out that the certain
answer to monotone queries over the incomplete target database are the same
as the answers of the same query over a representative speci c database (one of
the so called universal solutions { the core being a minimal among them) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
With this restriction on the query language, query answering over the target
databases becomes meaningful and e cient.
      </p>
      <p>
        To give meaning to more expressive queries (i.e queries with negation or
aggregation), various interesting extensions have been proposed to restrict the
uncertainty of the target instance. Extensions that are based on semantic
restriction include Close World Assumption (CWA) semantics by Libkin [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and
GCWA* semantics by Hernich [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Regarding to restrictions on syntax, a
mapping language which is more expressive than s-t tgds, namely, bidirectional tgds
were considered by Arenas et. al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. However, these syntax and semantic
restrictions are not strong enough in general to eliminate completely the uncertainty
of target instances. As a matter of fact, they can not rule out all anomalies in
query answering and also do not satisfy the ultimate goal of data exchange
materialising a valid target instance. Another way to deal with the problem is
to use the de nability abduction approach [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] that aims at nding extensions
(including t s tgds) to the initial schema mappings to guarantee the uniqueness
of the materialised target instance. The results mentioned in this paper can be
considered as the complexity analysis of the t s tgds extension in the approach.
Contribution. In this paper, we are interested in data exchange settings where
there is no ambiguity in selecting a target instance to be materialised and
consequently, query answering can be done properly through the target instance.
In other words, given a data exchange setting we would like to check if schema
mapping rules are strong enough to guarantee the uniqueness of valid target
instance. Obviously, we always get a negative answer if the language of schema
mapping is s-t tgds. Therefore, in the paper, we consider both source-to-target
tgds and target-to-source tgds (t-s tgds) for the mapping rules. The mapping is
called sts mapping in this paper.
      </p>
      <p>
        The mapping language was rst considered in peer data exchange [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] in
which a source peer may contribute data for a target peer through s-t tgds and
a target peer may use t-s tgds to restrict the data it receives. The mapping
language is more expressive than the bidirectional one in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] since it contains
arbitrary t-s tgds, not only the inverses of s-t tgds.
      </p>
      <p>Given a data exchange setting in which schema mapping is in sts, we study
the following decision questions.
1. Does the data exchange setting have an unique solution w.r.t a speci c source
instance?
2. Does the data exchange setting guarantee a unique solution for any source
instance?</p>
      <p>As an example for the rst problem, consider the source schema with two
relations fEmployee(EMPid), Phone(EMPid, PhNum)g, and a target schema with
one relation Contact(CONid, PhNum). Given a source database fEmployee(1),
Phone(1, 123)g and the following mappings:</p>
    </sec>
    <sec id="sec-2">
      <title>Employee(x) ! 9yContact (x; y)</title>
    </sec>
    <sec id="sec-3">
      <title>Contact (x; y) ! Phone(x; y)</title>
      <p>Obviously, there is only one target instance fContact(1, 123) g that together
with the source instance forms a logical model of the mappings and therefore
the decision procedure should give a positive answer. If we change the source
database to fEmployee(1), Phone(1, 123), Phone(2, 234)g, we do not have any
more a unique solution and receive a negative answer.</p>
      <p>To illustrate for the second problem, consider the source database with two
relations with the schema fEmployee(EMPid), Manager(MANid)g, and a target
database with one relation with the schema Sta (STid). In order to move the
data from each of the source relation to the target relation we could state the
following mappings:</p>
    </sec>
    <sec id="sec-4">
      <title>Employee(x) ! Sta (x)</title>
    </sec>
    <sec id="sec-5">
      <title>Manager (x) ! Sta (x)</title>
    </sec>
    <sec id="sec-6">
      <title>Sta (x) ! Employee(x)</title>
      <p>These mappings guarantee that for any source instance, there is at most one
solution for it under these mappings and therefore the decision procedure should
give a positive answer. Note that the mapping rules do not accept every source
instance, i.e source databases in which there is some manager which is not an
employee have no solution.</p>
      <p>
        Note that our notion of unique solution is not related to the unique-solution
property mentioned in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] about inverting schema mapping, since the latter
requires distinct source instances to have distinct sets of solutions.
Organisation. We start with some preliminary notions and de nitions related
to unique solution. In Section 3, we present the complexity results of checking
the existence of unique solution w.r.t a source instance. Next section is devoted
to the problem of guarantee unique solution. As usual, at the end is conclusion
and outlook.
      </p>
      <p>Formal Preliminaries
A schema is a nite set of predicate names with associated arities. Let R be
a schema, R = fR1; :::; Rkg, an instance I over R is an union of R1I; R2I; :::; RkI
such that each RiI is a nite set of tuples having the same arity as Ri. If I is an
instance of schema S1 and J is an instance of schema S2, we use (I; J ) to denote
an instance of schema S1 [ S2.</p>
      <p>We consider a classical rst-order logic setting to de ne the semantics of the
framework. If I is an instance and is a logic formula, we write I j= if I
satis es in the rst-order logic sense. If is a set of formulas, we write I j=
to mean I j= for every 2 . Given an instance I, we use Adom(I) to describe
the set of all constants appearing in I.</p>
      <p>Given a set of sentences , we use ( ) to denote the signature of , i.e. the
set of all non-logical symbols in .</p>
      <p>Dependencies. A tuple generating dependency (tgd) is a sentence of the form
8x; z('(x; z) ! 9y (x; y)), where ' and are conjunctions of atoms. For the
sake of readability, we write '(x; z) ! 9y (x; y) instead of the full formula. We
focus on simple tgds, i.e., tgds in which every atom does not contain occurrences
of constants and repeated occurrences of variables.</p>
      <p>A tgd is a source-to-target tgd (s-t tgd) if ' and are formulas over S and
T respectively, and vice versa, a tgd is a target-to-source tgd (t-s tgd) if ' and
are formulas over T and S respectively. A tgd is full if y = ;, otherwise, it is
embedded. A tgd is a local-as-view (LAV) dependency if ' is an atom. A LAV
dependency is complete if z = ;.</p>
      <p>Data Exchange. A data exchange setting is a tuple M = (S; T; ), where
the set is referred to schema mapping, S and T denote the source and target
schemas, respectively. In the following we consider only data exchange settings
M in which = st [ ts and st is a set of s-t tgds and ts is a set of t-s tgds.
We also assume that all the predicates from T appear in the schema mapping,
i.e. the mappings tell us some information about each target predicate.</p>
      <p>By a solution to the data exchange setting M for a source instance I, we
mean a target instance J such that (I; J ) j= . We use the notation Sol(M; I)
to denote the set of all solutions to the data exchange setting M for a source
instance I.</p>
      <p>
        Chase. Given an instance I and a set of tgds , if the chase of I with is
nite, we denote by chase (I) the result of the nite chase. Please refer to [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
for the detailed de nition of chase.
      </p>
      <p>Unique solution. We now de ne some notions related to unique solution that
will be used later to de ne our main problems.</p>
    </sec>
    <sec id="sec-7">
      <title>De nition 1. Given a data exchange setting M and a source instance I, (M; I)</title>
      <p>has a unique solution i there is only one J such that J is a solution of M w.r.t
the source instance I.</p>
      <p>Without a speci c source instance, we are interested in the following property
of data exchange setting.</p>
    </sec>
    <sec id="sec-8">
      <title>De nition 2. Given a data exchange setting M, we say that M guarantees unique solutions i for every source instance I, if there is a solution J of M w.r.t I then (M; I) has a unique solution.</title>
      <p>3</p>
      <p>Existence of Unique Solution
In this section, we study the complexity of checking if (M; I) has a unique
solution. Formally, given a data exchange setting M, the problem is de ned as
follows.</p>
      <p>Problem: ExistenceOf U niqueSolution(M)
Input: source instance I
Output: Is there a unique target instance J such
that J 2 Sol(M; I)?</p>
      <p>
        We start our complexity analysis with a general setting in which mapping
rules are arbitrary tgds. As we mentioned in the introduction, by considering
also t-s tgds in the mapping, our data exchange setting is similar to a peer data
exchange setting [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Since the data complexity of existent-of-solution problem
in peer data exchange setting is NP-complete, we do not expect a lower
complexity for ExistenceOf U niqueSolution(M). Indeed, we show that the complexity
connection between the two problems is analogous as the connection between
SAT and Unique SAT [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-9">
      <title>Theorem 1. Unique-solution-checking problem is in NP \ co-NP for data com</title>
      <p>plexity.</p>
      <p>Proof. Let us start the proof with a simple observation about the unique solution
of a given data exchange setting M and a source instance I. Intuitively, the
observation implies the fact that the number of tuples in the unique solution is
polynomially bounded by the input.</p>
    </sec>
    <sec id="sec-10">
      <title>Lemma 1. If J 2 Sol(M; I) and J is unique then Adom(J )</title>
      <sec id="sec-10-1">
        <title>Adom(I).</title>
        <p>Proof. Assume that there is an element a 2 Adom(J ) and a 2= Adom(I). Let
J 0 be a target instance which is the same as J but a is replaced by a0 for
some new constants a0 2= Adom(I) [ Adom(J ). J 0 is isomorphic to J , therefore
J 0 2 Sol(M; I). This leads to a contradiction to the fact that J is unique.</p>
        <p>Because the schema is xed, based on the lemma, it's straightforward to see
that target instances which could be the unique solution of data exchange setting
M for a source instance I have at most jTj jAdom(I)jm tuples where jTj is
the number of target predicates and m is the largest arity in T.</p>
        <p>As a consequence, we have the following naive algorithm to decide the
problem.
1. Verify in NP if there is a solution by guessing a target instance J using only
constants in Adom(I) and checking if J 2 Sol(M; I)
tu</p>
        <p>We show the problem is complete for the class of NP \ co-NP using the
following theorem.</p>
      </sec>
    </sec>
    <sec id="sec-11">
      <title>Theorem 2. Unique-solution-checking problem is NP \ co-NP hard.</title>
      <p>Proof. We prove the theorem by providing a reduction from Unique SAT to our
problem.</p>
      <p>Let be a propositional formula in CN F , = C1 ^ ::: ^ Cm where each Ci
is a disjunction of literals among n variables fp1; :::; png.</p>
      <p>We form M and I from as follows.</p>
      <p>S
T
I
= fL(:; :); C(:); P (:); V (:); T (:); F (:); N otP (:); I(:; :)g;
= fA(:; :); L0(:; :); T 0(:); F 0(:); I0(:; :)g;
st = fL(i; p) ! L0(i; p),</p>
      <p>T (x) ! T 0(x), F (x) ! F 0(x),
I(x; y) ! I0(x; y), P (x) ! 9yA(x; y),</p>
      <p>C(x) ! 9yz:L0(x; y) ^ A(y; z) ^ T 0(z)g
ts = fL0(i; p) ! L(i; p),</p>
      <p>T 0(x) ! T (x), F 0(x) ! F (x),
I0(x; y) ! I(x; y), A(x; y) ! V (y) ^ P (x),
A(x; y) ^ A(x; z) ^ T (y) ^ F (z) ! N otP (x),</p>
      <p>A(x; y) ^ A(x0; y) ^ I0(x; y0) ! N otP (x)g
= fP (pi); P ((pi))ji = 1; ng[
fV (true); V (f alse)g[
fT (true); F (f alse)g[
fI(pi; pi); I(pi; pi))g[
fC(i)ji = 1; ng[
fL(i; p)jp 2 Ci; i = 1; n)g[
fL(i; p)j:p 2 Ci; i = 1; n)g[
fN otP ( 1)g
Intuitively, ts [ st guarantees A is a correct assignment which assigns: (i)
truth values to propositions in and their negations; (ii) one truth value to one
literals and (iii) opposite values to opposite literals. Besides, the last dependency
in st implies that A form a model of .</p>
      <p>Now we show that is unique SAT if and only if (M; I) has a unique solution.</p>
      <p>If is unique SAT, let M be the unique model of . We consider target
instance J such that T 0J = T I ; L0J = LI ; F 0J = F I and AJ = f(p; true); (p; f alse)j
Lemma 2.</p>
      <p>Sol(M; I).
p 2 M g[f(p; true); (p; f alse)jp 2= M g. Obviously J 2 Sol(M; I) because M j=
then for every clause Ci, there is some literal in Ci is assigned to true. If J is
not unique then there is J 0 2 Sol(M; I) such that AJ0 6= AJ . Let M 0 6= M be
the interpretation in which pi 2 M 0 i (pi; true) 2 AJ0 , then for every clause Ci,
there is some literal l 2 Ci, l 2 M 0 if l is positive and l 2= M 0 if l is negative.
Consequently, M 0 j= . This leads to a contradiction.</p>
      <p>The inverse direction can be proved analogously.</p>
      <p>Since st and ts do not depend in , we can conclude the problem is NP
\ co-NP hard. tu</p>
      <p>Now, let us identify some cases where the problem can be solved by a
polynomial time algorithm.</p>
    </sec>
    <sec id="sec-12">
      <title>Theorem 3. Suppose we consider data exchange setting M in which dependen</title>
      <p>cies from target to source are full tgds. Then ExistenceOf U niqueSolution(M)
is tractable.</p>
      <p>Proof. In the algorithm mentioned in the proof of Theorem 1, one does not
know which could be the unique solution therefore we need to guess and check
an arbitrary one. This step is not necessary in case st contains only full tgds
because we know what could be the candidate for the unique solution.</p>
      <p>st contains only full tgds. If Sol(M; I) 6= ; then J = chase st (I) 2
Proof. Since J = chase st (I), (I; J ) j= st. Assume that J 2= Sol(M; I), then
(I; J ) 6j= ts. Let J 0 be a target instance such that J 0 2 Sol(M; I). Because st
contains only full tgds, J is also a core of the data exchange setting ( st; S; T ).
Therefore, J J 0. Besides, since (J 0; I) j= ts, (J; I) j= . This leads to a
contradiction.</p>
      <p>Assume J = chase st (I) 2 Sol(M; I) and there is another J1 2 Sol(M; I).
It holds that J J1 because st contains only full tgds. Let P be a target
predicate and a is a tuple such that P (a) 2 J1 n J . Consider the target instance
J2 = J [ fP (a)g. Since J J2, (I; J2) j= st. Besides, since J2 J1, (J2; I) j=
ts. Therefore J2 2 Sol(M; I). As a matter of fact, to verify if J is the unique
of (M; I), one can use the following PTIME algorithm:
{ Verify if J is a solution.
{ If J is a solution, for each target predicate P and each tuple a, check if
J2 = J [ P (a) is in Sol(M; I). If there is no such P (a then conclude J is the
unique solution.
tu</p>
      <p>A similar situation happens if we require
tgds.
ts to contain only complete LAV</p>
      <sec id="sec-12-1">
        <title>Theorem 4. If ts contains only complete LAV dependencies then the unique</title>
        <p>solution-checking problem is tractable .</p>
        <p>Proof. By restricting target to source dependencies to be complete LAV tgds,
we also know what could be the candidate for the unique solution. Assume
that we have T contains k target predicates T1; :::; Tk. W.l.o.g we can assume
that ts = fTi(x) ! si (x; y)ji = 1; kg where si (x; y) is some conjunctive
query over source schema S. Let ts1 = fTi(x) si (x; y)ji = 1; kg, then the
following lemma holds.</p>
        <p>Lemma 3. ts contains only complete LAV tgds. If Sol(M; I) 6= ; then J =
chase ts1 (I) 2 Sol(M; I).</p>
        <p>Proof. Since J = chase ts1 (I) 2 Sol(M; I), (I; J ) j= ts and TiJ = Isi for
i = 1; k. Assume that J 2= Sol(M; I), then (I; J ) 6j= st. Let J 0 be a target
instance such that J 0 2 Sol(M; I), (I; J 0) j= st then for each Ti 2 T, TiJ0 Isi .
Consequently, J 0 J . Besides, since (I; J 0) j= st, together with the fact J 0 J ,
we can imply (I; J ) j= st. This leads to a contradiction.</p>
        <p>Based on Lemma 3, we have an analogous polynomial algorithm as in the proof
of Theorem 3.
tu
4</p>
        <p>Guaranteeing Unique Solutions
In this section, we show results on complexity of deciding if a data exchange
setting guarantees a unique solution for any source instance. The problem is
formalised as follows.</p>
        <sec id="sec-12-1-1">
          <title>Problem: U niqueSolutionGuarantee()</title>
          <p>Input: a data exchange setting M</p>
          <p>Output: Does M guarantee unique solutions?</p>
          <p>Without any restriction in the syntax of mapping rules, we show that the
problem is undecidable as follows.</p>
        </sec>
      </sec>
      <sec id="sec-12-2">
        <title>Theorem 5. The problem of deciding if a data exchange setting guarantees unique solutions is undecidable.</title>
        <p>
          Proof. We prove the theorem by reducing the problem of checking conjunctive
query containment under a set of tgds [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] to our problem.
        </p>
        <p>Assume that we have a set of tgds and two conjunctive queries q1(x) and
q2(x) written over ( ), contains n dependencies i : i(x) ! 9y:'i(x; y),
i = 1; n. Take the data exchange setting M = (S; T; ) in which:
{ S = ( )
{ T = fp(:)g [ fTiji = 1; ng such that each Ti is a new predicate which has
the same arity as the arity of 'i(x; y).
{ st = fq1(x) ^ q2(x) ! p(x)g [ f i(x) ! 9y:Ti(x; y)ji = 1; ng [ f'i(x; y) !</p>
        <p>Ti(x; y)ji = 1; ng.
{ ts = fp(x) ! q1(x)g [ fTi(x; y) ! 'i(x; y)ji = 1; ng.</p>
        <p>We prove that j= q1 q2 if and only if M guarantees unique solutions.</p>
        <p>Assume that j= q1 q2, then j= 8x:q1(x) $ q1(x) ^ q2(x). Assume M
does not guarantee unique solutions, i.e there is a source instance I, there are
at least two di erent target instance J1; J2 such that both (I; J1) and (I; J2)
satisfy . Based on the construction of , we have for each target predicate Ti,
TTihJ1er=efoTriJe2, =pJ1'iI=. BpJe2sid=esq,1Isi=nceq1I \imq2I p.lTiehsis ,leadj=stqo1(ax)co$ntrqa1d(xic)t^ioqn2(txo)tahsewfaecllt.
that J1; J2 are di erent target instances.</p>
        <p>In case 6j= q1 q2, then 6j= 8x:q1(x) ! q2(x). Therefore, there is a source
instance I which is a model of but q1I 6= q1I \ q2I . Consider the two following
qd1Ii \erqe2In.tBtaasregdeto nintshtaendcees nJit1ioanndof J2, wJ1h;eJre2 aTriJe1 so=luTtiioJ1ns=of'MiI; .pJT1hi=s mq1Ie;apnJs2 M=
does not guarantee unique solutions.</p>
        <p>
          Note that the above reduction also yields a lower bound for the complexity
of the problem where the syntax of tgds is restricted and then it is decidable to
check conjunctive query containment under a set of tgds. In order to introduce
decidable algorithms for these cases, let us characterise necessary and su cient
conditions of a data exchange setting that guarantees unique solutions. This can
be done by using the notion of Beth's de nability [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>De nition 3 (Beth's de nability). Let be a set of sentences in FOL. A
predicate P is implicitly de nable from the set of predicates P under if for
every two interpretations I = hDI ; I i and J = hDJ ; J i such that they are
models of , it holds that PI = PJ implies P I = P J .</p>
        <p>Based on the correspondence between the above de nition and the de
nition of a data exchange that guarantees unique solutions, we have the following
lemma.</p>
      </sec>
    </sec>
    <sec id="sec-13">
      <title>Lemma 4. A data exchange setting M guarantees unique solutions if and only if for any predicate T 2 T, T is implicitly de nable from S under .</title>
      <p>Since Beth's de nability can be veri ed by a logical entailment, we also can
reduce the problem of checking the guarantee to the problem of checking atomic
query containment under a set of tgds as follows.</p>
    </sec>
    <sec id="sec-14">
      <title>Theorem 6. A data exchange setting M guarantees unique solutions if and</title>
      <p>only if for any predicate T 2 T, [ e j= 8x:T (x) $ Te(x) where e is obtained
from by replacing every target predicate Pt with a new predicate with the same
arity Pet and Te is a new predicate having the same arity as T .</p>
      <p>
        Together with the results in deciding query containment under tgds
mentioned in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the theorem and the reduction in the proof of Theorem 5 allow
us to obtain tight bounds of U niqueSolutionGuarantee() for the following
fragments of tgds.
      </p>
      <p>Corollary 1. Given data exchange setting M = (S; T; ). Deciding if M
guarantees unique solutions has the following complexity:</p>
      <sec id="sec-14-1">
        <title>1. 2EXPTIME-complete if</title>
      </sec>
      <sec id="sec-14-2">
        <title>2. 2EXPTIME-complete if is weakly guarded. contains only guarded tgds.</title>
        <p>Note that, by applying Beth's and Craig's theorems about de nability in the
case a data exchange setting guarantees unique solutions, one can actually
constructively rewrite target predicates as views of source predicates. Consequently,
given a source instance, a unique target instance can be materialised easily by
using SQL to compute the views.
5</p>
        <p>Conclusion and Outlook
We have considered the problem of checking if a data exchange setting under
sts mappings has a unique solution and therefore it satis es the purpose of
exchanging data. We have studied two decision questions of the problem, one
w.r.t a speci c source instance and one w.r.t any source instance. While the
former is decidable and can be solved using a Unique SAT solver, the latter is
undecidable in general and is 2EXPTIME-complete in some fragments of tgds.</p>
        <p>
          Besides the results and our on-going works in combined complexity analysis
of the former, there are some issues that are deserved for further investigation.
First, in [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] there is a syntactical class of tgds in which the existence-of-solution
of peer data exchange is tractable. Besides, the class covers the case of full
tgds and complete LAVs. Therefore, it is worth to study if the
existence-ofunique-solution problem is also tractable for this class. Second, more tgd-based
mapping languages should be considered for a complete complexity analysis such
as disjunctive tgds [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] and its guarded fragments [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Last but not least, in
the question about guarantee unique solution we have considered only the case
that solution-existence implies unique -solution-existence. It is still unknown if
the problem of checking a data exchange setting under sts mappings always
admitting unique solutions is decidable or undecidable.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Foto</surname>
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Afrati</surname>
          </string-name>
          and Phokion G. Kolaitis.
          <article-title>Answering aggregate queries in data exchange</article-title>
          .
          <source>In PODS, PODS '08</source>
          , pages
          <fpage>129</fpage>
          {
          <fpage>138</fpage>
          . ACM,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Marcelo</given-names>
            <surname>Arenas</surname>
          </string-name>
          , Pablo Barcelo, Ronald Fagin, and
          <string-name>
            <given-names>Leonid</given-names>
            <surname>Libkin</surname>
          </string-name>
          .
          <article-title>Locally consistent transformations and query answering in data exchange</article-title>
          .
          <source>In PODS, PODS '04</source>
          , pages
          <fpage>229</fpage>
          {
          <fpage>240</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Marcelo</given-names>
            <surname>Arenas</surname>
          </string-name>
          , Gabriel Dieguez, and
          <string-name>
            <given-names>Jorge</given-names>
            <surname>Perez</surname>
          </string-name>
          .
          <article-title>Bidirectional constraints for exchanging data: Beyond monotone queries</article-title>
          .
          <source>In Proceedings of the Twenty-Fourth International Joint Conference on Arti cial Intelligence</source>
          ,
          <source>IJCAI</source>
          <year>2015</year>
          ,
          <string-name>
            <given-names>Buenos</given-names>
            <surname>Aires</surname>
          </string-name>
          , Argentina,
          <source>July 25-31</source>
          ,
          <year>2015</year>
          , pages
          <fpage>2698</fpage>
          {
          <fpage>2705</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Andreas</given-names>
            <surname>Blass</surname>
          </string-name>
          and
          <string-name>
            <given-names>Yuri</given-names>
            <surname>Gurevich</surname>
          </string-name>
          .
          <article-title>On the unique satis ability problem</article-title>
          .
          <source>Information and Control</source>
          ,
          <volume>55</volume>
          (
          <issue>1-3</issue>
          ):
          <volume>80</volume>
          {
          <fpage>88</fpage>
          ,
          <year>1982</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Pierre</given-names>
            <surname>Bourhis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Morak</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Andreas</given-names>
            <surname>Pieris</surname>
          </string-name>
          .
          <article-title>The impact of disjunction on query answering under guarded-based existential rules</article-title>
          .
          <source>In IJCAI 2013, Proceedings of the 23rd International Joint Conference on Arti cial Intelligence</source>
          , Beijing, China,
          <source>August 3-9</source>
          ,
          <year>2013</year>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Cal</surname>
          </string-name>
          , Georg Gottlob, and
          <string-name>
            <given-names>Michael</given-names>
            <surname>Kifer</surname>
          </string-name>
          .
          <article-title>Taming the in nite chase: Query answering under expressive relational constraints</article-title>
          .
          <source>J. Artif. Intell. Res. (JAIR)</source>
          ,
          <volume>48</volume>
          :
          <fpage>115</fpage>
          {
          <fpage>174</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>William</given-names>
            <surname>Craig</surname>
          </string-name>
          .
          <article-title>Three uses of the Herbrand-Gentzen theorem in relating model theory and proof theory</article-title>
          .
          <source>J</source>
          .
          <string-name>
            <surname>Symb</surname>
          </string-name>
          . Log.,
          <volume>22</volume>
          (
          <issue>3</issue>
          ):
          <volume>269</volume>
          {
          <fpage>285</fpage>
          ,
          <year>1957</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Alin</given-names>
            <surname>Deutsch</surname>
          </string-name>
          , Alan Nash, and
          <string-name>
            <given-names>Je</given-names>
            <surname>Remmel</surname>
          </string-name>
          .
          <article-title>The chase revisited</article-title>
          .
          <source>In PODS, PODS '08</source>
          , pages
          <fpage>149</fpage>
          {
          <fpage>158</fpage>
          , New York, NY, USA,
          <year>2008</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Ronald</given-names>
            <surname>Fagin</surname>
          </string-name>
          .
          <article-title>Inverting schema mappings</article-title>
          .
          <source>In PODS, PODS '06</source>
          , pages
          <fpage>50</fpage>
          {
          <fpage>59</fpage>
          , New York, NY, USA,
          <year>2006</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Ronald</surname>
            <given-names>Fagin</given-names>
          </string-name>
          , Phokion G. Kolaitis,
          <string-name>
            <given-names>Renee J</given-names>
            .
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and Lucian</given-names>
            <surname>Popa</surname>
          </string-name>
          .
          <article-title>Data exchange: semantics and query answering</article-title>
          .
          <source>Theor. Comput. Sci.</source>
          ,
          <volume>336</volume>
          (
          <issue>1</issue>
          ):
          <volume>89</volume>
          {
          <fpage>124</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Ariel</surname>
            <given-names>Fuxman</given-names>
          </string-name>
          , Phokion G. Kolaitis,
          <string-name>
            <given-names>Renee J</given-names>
            .
            <surname>Miller</surname>
          </string-name>
          , and
          <article-title>Wang Chiew Tan</article-title>
          .
          <article-title>Peer data exchange</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .,
          <volume>31</volume>
          (
          <issue>4</issue>
          ):
          <volume>1454</volume>
          {
          <fpage>1498</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>Andre</given-names>
            <surname>Hernich</surname>
          </string-name>
          .
          <article-title>Answering non-monotonic queries in relational data exchange</article-title>
          .
          <source>In ICDT</source>
          , pages
          <volume>143</volume>
          {
          <fpage>154</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>Leonid</given-names>
            <surname>Libkin</surname>
          </string-name>
          .
          <article-title>Data exchange and incomplete information</article-title>
          .
          <source>In PODS, PODS '06</source>
          , pages
          <fpage>60</fpage>
          {
          <fpage>69</fpage>
          , New York, NY, USA,
          <year>2006</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>Leonid</given-names>
            <surname>Libkin</surname>
          </string-name>
          and
          <string-name>
            <given-names>Cristina</given-names>
            <surname>Sirangelo</surname>
          </string-name>
          .
          <article-title>Open and closed world assumptions in data exchange</article-title>
          .
          <source>In Proceedings of the 2009 Description Logics workshop</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>Nhung</given-names>
            <surname>Ngo</surname>
          </string-name>
          and
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Franconi</surname>
          </string-name>
          .
          <article-title>Unique solutions in data exchange</article-title>
          .
          <source>In Database and Expert Systems Applications - 25th International Conference, DEXA</source>
          <year>2014</year>
          , Munich, Germany, September 1-
          <issue>4</issue>
          ,
          <year>2014</year>
          . Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , pages
          <volume>281</volume>
          {
          <fpage>294</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>