Claims
- 1. A computer-implemented method of incrementally maintaining a materialized view with complex grouping expressions derived from at least one base table in a database stored on the computer, the method comprising the step of: subsequent to performing a modification to at least one base table in a transaction, building a data stream comprising modifications to be propagated to the materialized view.
- 2. The method of claim 1 wherein the modifications comprise deltas.
- 3. The method of claim 1 comprising the further step of applying the modifications to the materialized view.
- 4. The method of claim 1 wherein the building comprises the further steps of:
i) when the original modification is an update
(a) adding a tag column to distinguish data values before and after the modification; (b) aggregating the data stream according to the complex grouping expression of the materialized view extended with the tag column; (c) multiplying aggregate values resulting from step (c) with a value of the tag column; (d) reaggregating the data stream over all grouping columns and all grouping function columns, replacing the aggregation functions with their corresponding refresh functions; ii) when the original modification is an insertion or a deletion
aggregating the data stream according to the complex grouping expression of the materialized view
- 5. The method of claim 3 wherein the applying comprises the further steps of:
(a) pairing the data stream with the content of the materialized view (b) adjusting the aggregation functions to compute the new aggregate values; and (c) modifying a summary table.
- 6. The method of claim 5 wherein the pairing is performed with a left-outer-join with a predicate ranging over all grouping columns and grouping function columns of the materialized view.
- 7. The method of claim 5 wherein the adjusting compensates for aggregate functions that return NULL when their input is empty.
- 8. The method of claim 5 wherein the modifying of the summary table preserves the record for the grand total row.
- 9. The method of claim 1 wherein the building comprises the further step of incorporating modifications due to enforcement of database semantics.
- 11. The method of claim 9 wherein the semantics include referential integrity constraints.
- 12. The method of claim 9 wherein the semantics include triggers.
- 13. The method of claim 1 wherein the building comprises the further steps of:
adding a tag column to distinguish data values before and after the modification; and incorporating modifications due to enforcement of database semantics.
- 14. The method of claim 13 wherein the semantics include referential integrity constraints.
- 15. The method of claim 13 wherein the semantics include triggers.
- 16. A computer-implemented method of incrementally maintaining a materialized view with complex grouping expressions derived from at least one base table in a database stored on the computer, the method comprising the steps of:
performing a modification to at least one base table in a transaction; building a data stream comprising modifications to be propagated to the materialized view said modifications including deltas due to enforcement of database semantics; and, applying the modifications to the materialized view by pairing the data stream with the content of the materialized view, adjusting the aggregation functions to compute new aggregate values; and modifying a summary table.
- 17. A computer program product instantiated on a computer readable media, comprising:
first program code for building a data stream comprising modifications to be propagated to the materialized view; second program code for building a data stream comprising modifications to be propagated to the materialized view said modifications including deltas due to enforcement of database semantics; and third program code for applying the modifications to the materialized view by pairing the data stream with the content of the materialized view, adjusting the aggregation functions to compute new aggregate values; and modifying a summary table.
- 18. The computer program product of of claim 17 wherein the the third program code further comprises a set of program instructions for:
(a) pairing the data stream with the content of the materialized view (b) adjusting the aggregation functions to compute the new aggregate values; and (c) modifying a summary table.
- 19. The computer program product of claim 18 wherein the pairing is performed with a left-outer-join with a predicate ranging over all grouping columns and grouping function columns of the materialized view.
- 20. The computer program of claim 19 wherein the second program code comprises the instructions for incorporating modifications due to enforcement of database semantics.
- 21. A system for incrementally maintaining a materialized view with complex grouping expressions derived from at least one base table in a database stored on the computer, comprising:
means for performing a modification to at least one base table in a transaction; means for building a data stream comprising modifications to be propagated to the materialized view said modifications including deltas due to enforcement of database semantics; and, means for applying the modifications to the materialized view by pairing the data stream with the content of the materialized view, adjusting the aggregation functions to compute new aggregate values; and modifying a summary table.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application is a related to co-pending and commonly-assigned U.S. provisional patent application: S/No. 60/135,277, entitled “Incremental Maintenance of Aggregated Join Summary Tables”, filed on May 21, 1999. which is incorporated by reference herein as if printed in full below.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60135277 |
May 1999 |
US |