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]  John Grant,et al.  A logic-based approach to data integration , 2001, Theory and Practice of Logic Programming.

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

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

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

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

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

[7]  Todd D. Millstein,et al.  Query containment for data integration systems , 2003, J. Comput. Syst. Sci..

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

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

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

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

[12]  Alin Deutsch,et al.  Rewriting Queries Using Views with Access Patterns Under Integrity Constraints , 2005, ICDT.

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

[14]  J. van Leeuwen,et al.  Theoretical Computer Science , 2003, Lecture Notes in Computer Science.

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

[16]  Y HalevyAlon Answering queries using views: A survey , 2001, VLDB 2001.

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

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

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

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

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

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

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

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

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

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

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