Refreshing materialized views of a database to maintain consistency with underlying data
DCFirst Claim
1. A method of operating a system which contains a database, comprising the following steps:
- refreshing a first class of views of the database in response to the occurrence of one of a first class of events;
refreshing a second class of views of the database in response to the occurrence of one of a second class of events; and
in predetermined groups of views, maintaining mutual consistency in the data within each group.
18 Assignments
Litigations
0 Petitions
Accused Products
Abstract
In a database, a database manager can generate a view, which can be considered as a subset of the database, and which is placed outside the database for use without disturbing the database. However, if the database changes, the views will not reflect those changes, because the views are separate from the database. To solve this problem, a process called “refreshing” keeps the views consistent with the data within the database. But different refreshing approaches are used: some views require immediate refreshing when the database changes, other types can be refreshed at later times, and still other types can be refreshed at different times and intervals. The invention presents a system which keeps data consistent among the views and the database, despite the different times of refreshing undertaken.
73 Citations
13 Claims
-
1. A method of operating a system which contains a database, comprising the following steps:
-
refreshing a first class of views of the database in response to the occurrence of one of a first class of events;
refreshing a second class of views of the database in response to the occurrence of one of a second class of events; and
in predetermined groups of views, maintaining mutual consistency in the data within each group.
-
-
2. A system, comprising:
-
a database, containing data which changes over time;
means for providing immediate views of the database, which are refreshed whenever changes occur to the database;
deferred views of the database, which are refreshed whenever a query is made upon the deferred view; and
snapshot views of the database, which are refreshed at intervals;
means responsive to user input for collecting selected immediate views, deferred views, and snapshot views into respective view groups; and
means for maintaining mutual consistency of all views within every view group.
-
-
3. A method of operating a system which contains a database, comprising the following steps:
-
maintaining views, at least one of which are views of other views, and at least one of which of which are views of the database;
maintaining a view dependency graph of dependency relations of the views; and
in predetermined groups of views, maintaining mutual consistency in the data within each view group.
-
-
4. A system, comprising:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view; and
means for maintaining data which represents dependency relationships of the views, wherein all views exhibit the following characteristics; a) each view is assigned to exactly one view group;
b) all immediate views and deferred views belong to the same viewgroup as their parents;
c) if any snapshot view in a viewgroup VG is updated in a transaction T, then all snapshot views in VG are updated in T;
d) no snapshot view occurs in the same view group as base tables;
e) every view group is derived from at most one other viewgroup;
f) deferred views have no children in any other viewgroups;
g) no immediate view has a deferred view or a snapshot view as a parent;
h) no snapshot view has a deferred view as a parent; and
i) all the base tables are included in a single view group (VGBase).
-
-
5. A system, comprising:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view; and
means for maintaining data which represents dependency relationships of the views,wherein each view is assigned to exactly one view group, and all views exhibit at least one of the following characteristics; a) all immediate views and deferred views belong to the same viewgroup as their parents;
b) if any snapshot view in a viewgroup VG is updated in a transaction T, then all snapshot views in VG are updated in T;
c) no snapshot view occurs in the same view group as base tables;
d) every view group is derived from at most one other viewgroup;
e) deferred views have no children in any other viewgroups;
f) no immediate view has a deferred view or a snapshot view as a parent; and
g) no snapshot view has a deferred view as a parent.
-
-
6. In a system containing:
-
a database;
means for generating views based on he database, in which at least one view depends on at least one other view; and
means for maintaining data which represents dependency relationships of the views, the improvement comprising the following steps; a) eliminating snapshot views from view groups containing base tables; and
b) if any snapshot view in a viewgroup VG is updated in a transaction T, then updating all snapshot views in VG. - View Dependent Claims (12)
-
-
7. In a system containing:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view;
means for generating views based on the database, in which some views depend on other views; and
means for maintaining data which represents dependency relationships of the views, wherein each view is assigned to exactly one view group, the improvement comprising the following steps; a) keeping no snapshot views in view groups containing base tables; and
b) if any snapshot view in a viewgroup VG is updated in a transaction T, then updating all snapshot views in VG.
-
-
8. A system, comprising:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view; and
means for maintaining data which represents dependency relationships of the views, wherein views exhibit the following characteristics; a) each view is assigned to exactly one view group;
b) every view group is derived from at most one other viewgroup; and
c) all base tables are included in a single view group (VGBase). - View Dependent Claims (13)
-
-
9. A system, comprising:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view;
means for generating views based on the database, in which some views depend on other views; and
means for maintaining data which represents dependency relationships of the views, wherein each view is assigned to exactly one view group, the improvement comprising the following steps; a) each view is assigned to exactly one view group;
b) every view group is derived from at most one other view group; and
c) all base tables are included in a single view group (VGBase).
-
-
10. A system, comprising:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view; and
means for maintaining data which represents dependency relationships of the views, wherein respective views exhibit the following characteristics; a) all immediate views and deferred views belong to the same viewgroup as their parents;
b) if any snapshot view in a viewgroup VG is updated in a transaction T, then all snapshot views in VG are updated in T;
c) no snapshot view occurs in the same view group as base tables;
d) deferred views have no children in any other viewgroups;
e) no immediate view has a deferred view or a snapshot view as a parent; and
f) no snapshot view has a deferred view as a parent.
-
-
11. A system, comprising:
-
a database;
means for generating views based on the database, in which at least one view depends on at least one other view;
means for generating views based on the database, in which some views depend on other views; and
means for maintaining data which represents dependency relationships of the views, wherein each view is assigned to exactly one view group, and respective views exhibit the following characteristics; a) if any snapshot view in a viewgroup;
VG is updated in a transaction T, then all snapshot views in VG are updated in T;
b) no snapshot view occurs in the same view group as base tables;
c) deferred views have no children in any other viewgroups;
d) no immediate view has a deferred view or a snapshot view as a parent; and
e) no snapshot view has a deferred view as a parent.
-
Specification