Incremental Maintenance of Aggregate and Outerjoin Expressions Himanshu Gupta * SUNY, Stony Brook hgupta@cs.sunysb.edu Inderpal Singh Mumick Kirusa Inc. mumick@mumick.com Abstract Views stored in a data warehouse need to be kept current. As recomputing the views is very expensive, incremental maintenance algorithms are required. Over recent years, several incremental maintenance algorithms have been proposed. None of the proposed algorithms handle the general case of relational expressions involving aggregate and outerjoin operators efficiently. In this article, we develop the change-table technique for incrementally maintaining general view expres- sions involving relational and aggregate operators. We show that the change-table technique outperforms the previously proposed techniques by orders of magnitude. The developed framework easily extends to efficiently maintaining view expressions containing outerjoin operators. We prove that the developed change-table technique is an optimal incremental maintenance scheme for a given view expression tree under some reasonable assumptions. 1 Introduction In a data warehouse, views are computed and stored in the database to allow efficient querying and analysis of the data. These views stored at the data warehouse are known as materialized views. In order to keep the views in the data warehouse up to date, it is necessary to maintain the materialized views in response to the changes at the sources. The view can be either recomputed from scratch, or incrementally maintained by propagating the base data changes onto the view so that the view reflects the changes. Incrementally maintaining a view can be significantly cheaper than recomputing the view from scratch, especially if the size of the view is large compared to the size of the changes [BM90, MQM97, CKL + 97]. The problem of finding such changes at the views based on changes to the base relations has come to be known as the view maintenance problem and has been studied extensively. Several algorithms have been proposed over the recent years [BLT86, BCL89, CW91, QW91, GMS93, GL95, Qua97, MQM97, GJM97] for incremental maintenance of view expressions. The previously proposed algorithms on incremental maintenance suffer from the following shortcomings: • None of the earlier work handles the case of general view expressions involving aggregate and outerjoin operators. Quass in [Qua97] is the only work that attempts to maintain general view expressions involving aggregate operators, but the expressions obtained are very inefficient and complicated. Most of the other work [MQM97, PSCP02, GMS93] is limited to view expressions having only one aggregation operator ∗ Contact Author. Department of Computer Science, State University of New York, Stony Brook NY 11794. 1