Abstract
The extent of a view can be materialized
in the database, which can be used in query answering, thereby saving the cost
of assembling it from scratch. When the extent of a view is materialized, the
view is referred to as a materialized view (MV). View materialization is an important
technique for high performance query processing, data warehousing and online
analytical processing (OLAP).
An MV may be affected by updates to the
base extents from which it is derived. To keep it consistent with base data, an
MV can be re-materialized to reflect the updates to the base extents.
Generally, re-materializing the MV from scratch is more expensive than an
approach known as incremental view maintenance (IVM) that computes only
the changes that are necessary to keep the MV consistent with the database
state resulting from the update. We propose a comprehensive solution for incrementally
maintaining MVs defined using a subset of the object query language (OQL) of the
object data management group (ODMG) standard for object databases. We
incrementally maintain OQL views for most of update operations without
accessing base extents, an approach known as self-maintenance. Only when
a view can no longer be self-maintained are base extents accessed.
This
thesis contributes a solution to the IVM problem using an algebraic approach. We provide algorithms for deriving the specification
of update events from the MV definition that can potentially affect the MV. The
specifications of update events are used to monitor changes to the database. We
devise algorithms that generate algebraic plans that, when evaluated in the wake
of updates to the database, compute a sequence of changes to an MV. When such changes
are applied to the affected view, the new value of the view is consistent with
the current state of the database.
A prototype of the solution to the IVM problem has been implemented on an ODMG-compliant database system. A systematic and comprehensive performance evaluation of the prototype has been carried out, empirically investigating the usefulness of the solution in practice. The results obtained from the evaluation show that selectivity and complexity of the views and database size all affect the effectiveness of IVM compared with alternative approaches using virtual views or re-materialization.