Technique are provided for maintaining pre-computed aggregate views. A
pre-computed aggregate view derived from one or more base tables is
received, the pre-computed aggregate view including a pre-computed
aggregate table and a view definition, the view definition including
aggregate functions that can be any combination of sum, sum distinct,
count(*), count, count distinct, min, and max, the view definition
further including expressions that may be nullable. Changes to the one or
more base tables are received, the changes being represented as
insertions and deletions and being non-minimal. A set of incremental
modifications to the pre-computed aggregate table are derived and applied
based on the changes to the one or more base tables, wherein
modifications may include any combination of inserts, deletes, and
updates. Deriving the set of incremental modifications to the
pre-computed aggregate table includes deriving a first table wherein each
record, representing an aggregated group of changes, shows for each
aggregation function, the contributions of base table changes that are
insertions for the group and the contributions of base table changes that
are deletions for the group and using some combination of information in
the first table, the pre-computed aggregate table, and the one or more
base tables from which the pre-computed view is derived.