Implementing Incremental View Maintenance in Nested Data Models Akira Kawaguchi 1 Daniel Lieuwen ~ Inderpal Mumick 3 Kenneth Ross 1 1 Columbia University, {akira,kar}@cs.columbia.edu 2 Bell Laboratories/Lucent Technologies, lieuwen@research.bell-labs.com 3 Savera Systems (work performed at AT&T Laboratories), mumick@savera.com Abstract. Previous research on materialized views has primarily been in the context of flat relational databases--materialized views defined in terms of one or more flat relations. This paper discusses a broader class of view definitions--materialized views defined over a nested data model such as the nested relational model or an object-oriented data model. An attribute of a tuple deriving the view can be a reference (i.e., a pointer) to a nested relation, with arbitrary levels of nesting possible. The extended capability of this nested data model, together with materialized views, simplifies data modeling and gives more flexibility. Simple extensions of standard view maintenance techniques to the nested model would do too much work for maintenance: a change in a nested set would re-process the entire nested set, not just the changed parts. We show how existing incremental maintenance algorithms can be extended to maintain the views without performing this additional work. We describe the implementation of these techniques in the SWORD in- terface to the Ode database system. The implementation is based on the representation of nested structures by classes and the use of an SQL-like language to define materialized views. We outline the data structures and algorithms used in the implementation and examine performance. This is one of the first pieces of work to explore the applicability of materialized views over complex objects. 1 Introduction Most past research on materialized views has focused on high level incremental algorithms for updating materialized views efficiently when the base relations are updated [9, 37, 8, 31, 10, 17, 16, 25, 40]. Those studies are in the context of first-normal-form relational databases--materialized views are defined in terms of one or more relations using a relational query language. In this paper, we allow a materialized view to be defined over a nested data model, where a tuple can have arbitrarily deeply nested structures. For the simplicity of our discussion