A system for incrementally maintaining non-distributive aggregate functions in
a relational database includes a data storage device in which a relational database
is stored. A processor communicates with the data storage device and includes a
database maintenance module. The database maintenance module includes a program
for incrementally maintaining non-distributive aggregate functions in a relational
database. The method embodied in the program includes determining whether all functions
in a relational database query are distributive. Based on this determination, a
basic propagate phase graph is selectively altered to yield a new propagate phase
graph. Changes to an automatic summary table are then applied thereto based on
the new propagate phase graph.