Answering Queries Using Views.

We consider the problem of computing answers to queries by using materialized views. Aside from its potential in optimizing query evaluation, the problem also arises in applications such as Global Information Systems, Mobile Computing and maintaining physical data independence. We consider the problem of finding a rewriting of a query that uses the materialized views, the problem of finding minimal rewritings, and finding complete rewritings (i.e., rewritings that use only the views). We show that all the possible rewritings can be obtained by considering cent ainment mappings from the views to the query, and that the problems we consider are NP-complete when both the query and the views are conjunctive and don’t involve builtin comparison predicates. We show that the problem has two independent sources of complexity (the number of possible containment mappings, and the complexity of deciding which literals from the original query can be deleted). We describe a polynomial time algorithm for finding rewritings, and show that under certain conditions, it will find the minimal rewriting. Finally, we analyze the complexity of the problems when the queries and views may be disjunctive and involve built-in comparison predicates.

[1]  Marvin H. Solomon,et al.  The GMAP: a versatile tool for physical data independence , 1996, The VLDB Journal.

[2]  Tomasz Imielinski,et al.  Sleepers and workaholics: caching strategies in mobile environments , 1994, SIGMOD '94.

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

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

[5]  Divesh Srivastava,et al.  Answering Queries with Aggregation Using Views , 1996, VLDB.

[6]  Michael Stonebraker,et al.  On rules, procedure, caching and views in data base systems , 1990, SIGMOD '90.

[7]  Michael Stonebraker,et al.  On rules, procedures, caching and views in database systems , 1994, SIGMOD 1994.

[8]  Nick Roussopoulos,et al.  The Implementation and Performance Evaluation of the ADMS Query Optimizer: Integrating Query Result Caching and Matching , 1994, EDBT.

[9]  Oded Shmueli Decidability and Expressiveness of Logic Queries. , 1987, PODS 1987.

[10]  Kenneth A. Ross,et al.  Adapting materialized views after redefinitions , 1995, SIGMOD '95.

[11]  Mihalis Yannakakis,et al.  Equivalence among Relational Expressions with the Union and Difference Operation , 1978, VLDB.

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

[13]  Kyuseok Shim,et al.  Optimizing queries with materialized views , 1995, Proceedings of the Eleventh International Conference on Data Engineering.

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

[15]  Arthur M. Keller,et al.  A predicate-based caching scheme for client-server database architectures , 1994, Proceedings of 3rd International Conference on Parallel and Distributed Information Systems.

[16]  Surajit Chaudhuri,et al.  On the equivalence of recursive and nonrecursive datalog programs , 1992, J. Comput. Syst. Sci..

[17]  Per-Åke Larson,et al.  Query Transformation for PSJ-Queries , 1987, VLDB.

[18]  Per-Åke Larson,et al.  Computing Queries from Derived Relations , 1985, VLDB.

[19]  Arthur M. Keller,et al.  A predicate-based caching scheme for client-server database architectures , 1994, Proceedings of 3rd International Conference on Parallel and Distributed Information Systems.

[20]  R. Van der Meyden,et al.  The complexity of querying indefinite data about linearly ordered domains , 1992, PODS '92.

[21]  Timos K. Sellis,et al.  Intelligent caching and indexing techniques for relational database systems , 1988, Inf. Syst..

[22]  Alon Y. Halevy,et al.  Queries Independent of Updates , 1993, VLDB.

[23]  A. Prasad Sistla,et al.  Data replication for mobile computers , 1994, SIGMOD '94.

[24]  Ron van der Meyden,et al.  The complexity of querying indefinite data about linearly ordered domains , 1992, J. Comput. Syst. Sci..