Rewriting Queries Using Views with Access Patterns Under Integrity Constraints

We study the problem of rewriting queries using views in the presence of access patterns, integrity constraints, disjunction, and negation. We provide asymptotically optimal algorithms for finding minimal containing and maximal contained rewritings and for deciding whether an exact rewriting exists. We show that rewriting queries using views in this case reduces (a) to rewriting queries with access patterns and constraints without views and also (b) to rewriting queries using views under constraints without access patterns. We show how to solve (a) directly and how to reduce (b) to rewriting queries under constraints only (semantic optimization). These reductions provide two separate routes to a unified solution for all three problems, based on an extension of the relational chase theory to queries and constraints with disjunction and negation. We also handle equality and arithmetic comparisons.

[1]  Alon Y. Halevy,et al.  Answering queries using views: A survey , 2001, The VLDB Journal.

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

[3]  Alon Y. Levy Logic-based techniques in data integration , 2001 .

[4]  Jeffrey D. Ullman,et al.  The complexity of ordering subgoals , 1988, PODS.

[5]  Bertram Ludäscher,et al.  Processing first-order queries under limited access patterns , 2004, PODS '04.

[6]  John Grant,et al.  A logic-based approach to data integration , 2001, Theory and Practice of Logic Programming.

[7]  Bertram Ludäscher,et al.  Processing Unions of Conjunctive Queries with Negation under Limited Access Patterns , 2004, EDBT.

[8]  Chen Li,et al.  Computing complete answers to queries in the presence of limited access patterns , 2003, The VLDB Journal.

[9]  Anand Rajaraman,et al.  Answering queries using templates with binding patterns (extended abstract) , 1995, PODS.

[10]  Alin Deutsch,et al.  MARS: A System for Publishing XML from Mixed and Redundant Storage , 2003, VLDB.

[11]  Edward Y. Chang,et al.  On Answering Queries in the Presence of Limited Access Patterns , 2001, ICDT.

[12]  Yannis Papakonstantinou,et al.  Expressive Capabilities Description Languages and Query Rewriting Algorithms , 2000, J. Log. Program..

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

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

[15]  Alin Deutsch,et al.  Reformulation of XML Queries and Constraints , 2003, ICDT.

[16]  Masatoshi Yoshikawa,et al.  On the equivalence of database restructurings involving object identifiers (extended abstract) , 1991, PODS.

[17]  Jeffrey D. Ullman,et al.  Answering queries using templates with binding patterns (extended abstract) , 1995, PODS '95.

[18]  Ioana Manolescu,et al.  Query optimization in the presence of limited access patterns , 1999, SIGMOD '99.

[19]  Todd D. Millstein,et al.  Query containment for data integration systems , 2000, PODS '00.

[20]  Michael R. Genesereth,et al.  Answering recursive queries using views , 1997, PODS '97.

[21]  Joann J. Ordille,et al.  Querying Heterogeneous Information Sources Using Source Descriptions , 1996, VLDB.

[22]  Christoph Koch,et al.  Query rewriting with symmetric constraints , 2002, AI Commun..

[23]  Mihalis Yannakakis,et al.  Equivalences Among Relational Expressions with the Union and Difference Operators , 1980, J. ACM.

[24]  Alon Y. Halevy,et al.  Recursive Query Plans for Data Integration , 2000, J. Log. Program..