Data exchange, also known as data translation, has been extensively investigated in recent years. One main direction of research has focused on the semantics and the complexity of answering first-order queries in the context of data exchange between relational schemas. In this paper, we initiate a systematic investigation of the semantics and the complexity of aggregate queries in data exchange, and make a number of conceptual and technical contributions. Data exchange is a context in which incomplete information arises, hence one has to cope with a set of possible worlds, instead of a single database. Three different sets of possible worlds have been explored in the study of the certain answers of first-order queries in data exchange: the set of possible worlds of all solutions, the set of possible worlds of all universal solutions, and a set of possible worlds derived from the CWA-solutions. We examine each of these sets and point out that none of them is suitable for aggregation in data exchange, as each gives rise to rather trivial semantics. Our analysis also reveals that, to have meaningful semantics for aggregation in data exchange, a strict closed world assumption has to be adopted in selecting the set of possible worlds. For this, we introduce and study the set of the endomorphic images of the canonical universal solution as a set of possible worlds for aggregation in data exchange. Our main technical result is that for schema mappings specified by source-to-target tgds, there are polynomial-time algorithms for computing the range semantics of every scalar aggregation query, where the range semantics of an aggregate query is the greatest lower bound and the least upper bound of the values that the query takes over the set of possible worlds. Among these algorithms, the more sophisticated one is the algorithm for the average operator, which makes use of concepts originally introduced in the study of the core of the universal solutions in data exchange. We also show that if, instead of range semantics, we consider possible answer semantics, then it is an NP-complete problem to tell if a number is a possible answer of a given scalar aggregation query with the average operator.
[1]
Philip A. Bernstein,et al.
Composition of mappings given by embedded dependencies
,
2005,
PODS '05.
[2]
Georg Gottlob,et al.
Computing cores for data exchange: new algorithms and practical solutions
,
2005,
PODS '05.
[3]
Leonid Libkin,et al.
Data exchange and incomplete information
,
2006,
PODS '06.
[4]
Aleksander Madry,et al.
Data exchange: On the complexity of answering queries with inequalities
,
2005,
Inf. Process. Lett..
[5]
Ronald Fagin,et al.
Data exchange: semantics and query answering
,
2003,
Theor. Comput. Sci..
[6]
日本工業標準調査会.
基本機能 (SQL/Foundation)
,
2002
.
[7]
Xin He,et al.
Scalar aggregation in inconsistent databases
,
2003,
Theor. Comput. Sci..
[8]
Renée J. Miller,et al.
ConQuer: efficient management of inconsistent databases
,
2005,
SIGMOD '05.
[9]
Phokion G. Kolaitis,et al.
Peer data exchange
,
2005,
PODS '05.
[10]
Laura M. Haas,et al.
Clio grows up: from research prototype to industrial tool
,
2005,
SIGMOD '05.
[11]
Sergey Melnik,et al.
Generic Model Management: Concepts And Algorithms (Lecture Notes in Computer Science)
,
2004
.
[12]
Marcelo Arenas,et al.
XML data exchange: consistency and query answering
,
2005,
PODS '05.
[13]
Ronald Fagin,et al.
Composing schema mappings: second-order dependencies to the rescue
,
2004,
PODS '04.
[14]
Ronald Fagin,et al.
Inverting schema mappings
,
2006,
TODS.
[15]
Nicole Schweikardt,et al.
CWA-solutions for data exchange settings with target dependencies
,
2007,
PODS '07.
[16]
Chen Li,et al.
Data exchange in the presence of arithmetic comparisons
,
2008,
EDBT '08.
[17]
Georg Gottlob,et al.
Data exchange: computing cores in polynomial time
,
2006,
PODS '06.
[18]
Sergey Melnik,et al.
Generic Model Management
,
2004,
Lecture Notes in Computer Science.
[19]
Ronald Fagin,et al.
Quasi-inverses of schema mappings
,
2007,
PODS '07.