We consider a variant of the view maintenance problem: How does one keep a
materialized view up-to-date when the view definition itself changes? Can o
ne do better than recomputing the view from the base relations? Traditional
view maintenance tries to maintain the materialized view in response to mo
difications to the base relations; we try to "adapt" the view in response t
o changes in the view definition.
Such techniques are needed for applications where the user can change queri
es dynamically and wants to see the changes in the results fast. Data archa
eology, data visualization, and dynamic queries are examples of such applic
ations. Views defined over the Internet tend to evolve and our technique ca
n be useful for adapting such views.
We consider all possible redefinitions of SQL SELECT-FROM-WHERE-GROUP-BY-HA
VING, UNION, and EXCEPT views, and show how these views can be adapted usin
g the old materialization for the cases where it is possible to do so. We i
dentify extra information that can be kept with a materialization to facili
tate redefinition. Multiple simultaneous changes to a view can be handled w
ithout necessarily materializing intermediate results. We identify guidelin
es for users and database administrators that can be used to facilitate eff
icient view adaptation.
We perform a systematic experimental evaluation of our proposed techniques.
Our evaluation indicates that adaptation is much more efficient than remat
erialization in most cases. In-place adaptation methods are better than the
non-in-place methods when the change is small. We also point out some impo
rtant factors that can impact the efficiency of adaptation. (C) 2001 Elsevi
er Science Ltd. All rights reserved.