Patent ID: 7020649

Claim:
A system for incrementally maintaining non-distributive aggregate functions in materialized views of relational databases, comprising: at least one data storage device including at least one relational database; at least one processor communicating with said data storage device; at least one database maintenance module associated with said processor and including a program for selectively altering a predetermined propagate phase data structure to yield a new propagate phase data structure and for selectively applying changes to at least one materialized view according to said new propagate phase data structure, wherein: when a grouping expression contains a super-aggregate, the program undertakes logic including: marking a predicate as a super-aggregate predicate; defining a dimension column A and a corresponding indicator column g(A); and when the marked predicate encounters a simple group-by operation, iteratively; (a) for each A in said simple group-by operation, preserving all terms in said marked predicate containing A and adding term g(A)=0 to said marked predicate; and (b) for each A not in said simple group-by operation, removing all terms in said marked predicate containing A and adding term g(A)=1 to said marded predicate.