Composing schema mappings: second-order dependencies to the rescue

A schema mapping is a specification that describes how data structured under one schema (the source schema) is to be transformed into data structured under a different schema (the target schema). Schema mappings play a key role in numerous areas of database systems, including database design, information integration, and model management. A fundamental problem in this context is composing schema mappings: given two successive schema mappings, derive a schema mapping between the source schema of the first and the target schema of the second that has the same effect as applying successively the two schema mappings.In this paper, we give a rigorous semantics to the composition of schema mappings and investigate the definability and computational complexity of the composition of two schema mappings. We first study the important case of schema mappings in which the specification is given by a finite set of source-to-target tuple-generating dependencies (source-to-target tgds). We show that the composition of a finite set of full source-to-target tgds with a finite set of tgds is always definable by a finite set of source-to-target tgds, but the composition of a finite set of source-to-target tgds with a finite set of full source-to-target tgds may not be definable by any set (finite or infinite) of source-to-target tgds; furthermore, it may not be definable by any formula of least fixed-point logic, and the associated composition query may be NP-complete. After this, we introduce a class of existential second-order formulas with function symbols, which we call second-order tgds, and make a case that they are the "right" language for composing schema mappings. To this effect, we show that the composition of finite sets of source-to-target tgds is always definable by a second-order tgd. Moreover, the composition of second-order tgds is also definable by a second-order tgd. Our second-order tgds allow equalities, even though the "obvious" way to define them does not require equalities. Allowing equalities in second-order tgds turns out to be of the essence, because we show that second-order tgds without equalities are not sufficiently expressive to define even the composition of finite sets of source-to-target tgds. Finally, we show that second-order tgds possess good properties for data exchange. In particular. the chase procedure can be extended to second-order tgds so that it produces polynomial-time computable universal solutions in data exchange settings specified by second-order tgds.

[1]  Tomás Feder,et al.  The Computational Structure of Monotone Monadic SNP and Constraint Satisfaction: A Study through Datalog and Group Theory , 1999, SIAM J. Comput..

[2]  Tomás Feder,et al.  Monotone monadic SNP and constraint satisfaction , 1993, STOC.

[3]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[4]  Ronald Fagin,et al.  Translating Web Data , 2002, VLDB.

[5]  Ronald Fagin,et al.  Horn clauses and database dependencies , 1982, JACM.

[6]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[7]  Alon Y. Halevy,et al.  Piazza: data management infrastructure for semantic web applications , 2003, WWW '03.

[8]  Ronald Fagin,et al.  Data exchange: semantics and query answering , 2005, Theor. Comput. Sci..

[9]  Anuj Dawar A Restricted Second Order Logic for Finite Structures , 1998, Inf. Comput..

[10]  David Harel,et al.  Structure and complexity of relational queries , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[11]  Jayant Madhavan,et al.  Composing Mappings Among Data Sources , 2003, VLDB.

[12]  Philip A. Bernstein,et al.  Applying Model Management to Classical Meta Data Problems , 2003, CIDR.

[13]  Catriel Beeri,et al.  A Proof Procedure for Data Dependencies , 1984, JACM.

[14]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[15]  Panos Vassiliadis,et al.  On the Logical Modeling of ETL Processes , 2002, CAiSE.

[16]  Ronald Fagin,et al.  Data exchange: getting to the core , 2003, PODS '03.

[17]  David S. Johnson,et al.  Some Simplified NP-Complete Graph Problems , 1976, Theor. Comput. Sci..

[18]  Jörg Flum,et al.  Finite model theory , 1995, Perspectives in Mathematical Logic.

[19]  Maurizio Lenzerini,et al.  Data integration: a theoretical perspective , 2002, PODS.

[20]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[21]  Serge Abiteboul,et al.  Complexity of answering queries using materialized views , 1998, PODS.

[22]  Laura M. Haas,et al.  Schema Mapping as Query Discovery , 2000, VLDB.

[23]  Catriel Beeri,et al.  Formal Systems for Tuple and Equality Generating Dependencies , 1984, SIAM J. Comput..