Materialized view maintenance and integrity constraint checking
- 1 June 1996
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGMOD Record
- Vol. 25 (2) , 447-458
- https://doi.org/10.1145/235968.233361
Abstract
We investigate the problem of incremental maintenance of an SQL view in the face of database updates, and show that it is possible to reduce the total time cost of view maintenance by materializing (and maintaining) additional views. We formulate the problem of determining the optimal set of additional views to materialize as an optimization problem over the space of possible view sets (which includes the empty set). The optimization problem is harder than query optimization since it has to deal with multiple view sets, updates of multiple relations, and multiple ways of maintaining each view set for each updated relation.We develop a memoing solution for the problem; the solution can be implemented using the expression DAG representation used in rule-based optimizers such as Volcano. We demonstrate that global optimization cannot, in general, be achieved by locally optimizing each materialized subview, because common subexpressions between different materialized subviews can allow nonoptimal local plans to be combined into an optimal global plan. We identify conditions on materialized subviews in the expression DAG when local optimization is possible. Finally, we suggest heuristics that can be used to efficiently determine a useful set of additional views to materialize.Our results are particularly important for the efficient checking of assertions (complex integrity constraints) in the SQL-92 standard, since the incremental checking of such integrity constraints is known to be essentially equivalent to the view maintenance problem.Keywords
This publication has 10 references indexed in Scilit:
- Answering queries using views (extended abstract)Published by Association for Computing Machinery (ACM) ,1995
- Incremental maintenance of views with duplicatesPublished by Association for Computing Machinery (ACM) ,1995
- Adapting materialized views after redefinitionsPublished by Association for Computing Machinery (ACM) ,1995
- Maintaining views incrementallyPublished by Association for Computing Machinery (ACM) ,1993
- Rule condition testing and action execution in ArielPublished by Association for Computing Machinery (ACM) ,1992
- On the power of magicThe Journal of Logic Programming, 1991
- Incremental recomputation of active relational expressionsIEEE Transactions on Knowledge and Data Engineering, 1991
- Updating distributed materialized viewsIEEE Transactions on Knowledge and Data Engineering, 1989
- Multiple-query optimizationACM Transactions on Database Systems, 1988
- Efficiently updating materialized viewsPublished by Association for Computing Machinery (ACM) ,1986