Incremental maintenance of materialized views containing one-to-one lossless joins
First Claim
1. A method for performing an incremental refresh of a materialized view defined by a lossless one-to-one join, the method comprising the steps of:
- establishing a base table of the materialized view as a selected table;
if the selected table is the right table of an outer join, then performing the steps ofsetting to NULL selected columns of rows of the materialized view based on rows of the selected table that have been updated or deleted in the selected table after a prior refresh operation;
updating NULL values in selected columns of the materialized view to reflect new values caused by updates and inserts into the selected table that occurred after the prior refresh operation;
if the selected table is not the right table of an outer join, then performing the steps ofdeleting rows from the materialized view based on rows of the selected table that have been updated or deleted in the selected table after the prior refresh operation; and
inserting rows into the materialized view based on updates and inserts into the selected table that occurred after the prior refresh operation.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus are provided for performing incremental refreshes to materialized views defined by one-to-one lossless joins. Each base table of the materialized view is selected to be processed as the current "selected table". During the processing, if the selected table is the right table of an outer join, then selected columns of rows of the materialized view are set to NULL based on rows of the selected table that have been updated or deleted in the selected table after a prior refresh operation. Then, NULL values in selected columns of the materialized view are updated to reflect new values caused by updates and inserts into the selected table that occurred after the prior refresh operation. If the selected table is not the right table of an outer join, then rows from the materialized view are deleted based on rows of the selected table that have been updated or deleted in the selected table after the prior refresh operation. Then, rows are inserted into the materialized view based on updates and inserts into the selected table that occurred after the prior refresh operation. The incremental refresh techniques are "memoryless" in that they do not require a record of the sequence of changes that were made subsequent to the prior refresh operation. Techniques are described for performing the incremental refresh steps through the use of database commands and queries.
-
Citations
21 Claims
-
1. A method for performing an incremental refresh of a materialized view defined by a lossless one-to-one join, the method comprising the steps of:
-
establishing a base table of the materialized view as a selected table; if the selected table is the right table of an outer join, then performing the steps of setting to NULL selected columns of rows of the materialized view based on rows of the selected table that have been updated or deleted in the selected table after a prior refresh operation; updating NULL values in selected columns of the materialized view to reflect new values caused by updates and inserts into the selected table that occurred after the prior refresh operation; if the selected table is not the right table of an outer join, then performing the steps of deleting rows from the materialized view based on rows of the selected table that have been updated or deleted in the selected table after the prior refresh operation; and inserting rows into the materialized view based on updates and inserts into the selected table that occurred after the prior refresh operation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer-readable medium bearing instructions for performing an incremental refresh of a materialized, lossless, one-to-one join view, the instructions including instructions for performing the steps of:
- establishing a base table of the materialized view as a selected table;
if the selected table is the right table of an outer join, then performing the steps ofsetting to NULL selected columns of rows of the materialized view based on rows of the selected table that have been updated or deleted in the selected table after a prior refresh operation; updating NULL values in selected columns of the materialized view to reflect new values caused by updates and inserts into the selected table that occurred after the prior refresh operation; if the selected table is not the right table of an outer join, then performing the steps of deleting rows from the materialized view based on rows of the selected table that have been updated or deleted in the selected table after the prior refresh operation; and inserting rows into the materialized view based on updates and inserts into the selected table that occurred after the prior refresh operation. - View Dependent Claims (13, 14, 15, 16)
- establishing a base table of the materialized view as a selected table;
-
17. A database system including:
-
a plurality of base tables; a one-to-one lossless materialized join view derived from said base tables; a mechanism for identifying changes that occur to said base tables after a prior refresh operation; a database server configured to incrementally refresh said materialized view by performing the steps of; establishing a base table of the materialized view as a selected table; if the selected table is the right table of an outer join, then performing the steps of setting to NULL selected columns of rows of the materialized view based on rows of the selected table that have been updated or deleted in the selected table after a prior refresh operation; updating NULL values in selected columns of the materialized view to reflect new values caused by updates and inserts into the selected table that occurred after the prior refresh operation; if the selected table is not the right table of an outer join, then performing the steps of deleting rows from the materialized view based on rows of the selected table that have been updated or deleted in the selected table after the prior refresh operation; and inserting rows into the materialized view based on updates and inserts into the selected table that occurred after the prior refresh operation. - View Dependent Claims (18, 19, 20, 21)
-
Specification