Query based invalidation subscription
First Claim
1. A computer-implemented method for tracking changes to data, the method comprising the steps of:
- receiving, at a database server that manages access to a database, a request from a first subscriber to register a first query to receive change notifications of modifications to the database that may change the result of the first query;
said database server registering said first query in response to said request from said first subscriber;
receiving, at said database server, a request from a second subscriber to register a second query to receive change notifications of modifications to the database that may change the result of the second query;
said database server registering said second query in response to said request from said second subscriber;
receiving, at said database server, a request from said first subscriber to make a modification, as part of a database transaction, to the database;
said database server determining that said modification may change a result of said first query and said second query;
returning to said first subscriber, before said database transaction commits, a notification to indicate that said modification may have changed the result of said first query; and
after returning said notification to said first subscriber, committing said database transaction and, after said database transaction commits, transmitting a notification to said second subscriber to indicate that said modification, requested by said first subscriber, may have changed the result of said second query;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
A query result set is an example of a type of body of data whose content is defined by a query. Modifications to a database can change the result of a query and therefore what the content of such a body of data, such as a result set, should be. Active Queries is an approach that enables a database server to detect database changes that alter the result of a query registered for a client and to notify a client of those changes. The notifications may be sent to, for example, a cache manager responsible for maintaining coherency of a result set cache generated by the query. The notification notifies the cache manager of when and/or what changes are needed to maintain the coherency of the cache.
36 Citations
30 Claims
-
1. A computer-implemented method for tracking changes to data, the method comprising the steps of:
-
receiving, at a database server that manages access to a database, a request from a first subscriber to register a first query to receive change notifications of modifications to the database that may change the result of the first query; said database server registering said first query in response to said request from said first subscriber; receiving, at said database server, a request from a second subscriber to register a second query to receive change notifications of modifications to the database that may change the result of the second query; said database server registering said second query in response to said request from said second subscriber; receiving, at said database server, a request from said first subscriber to make a modification, as part of a database transaction, to the database; said database server determining that said modification may change a result of said first query and said second query; returning to said first subscriber, before said database transaction commits, a notification to indicate that said modification may have changed the result of said first query; and after returning said notification to said first subscriber, committing said database transaction and, after said database transaction commits, transmitting a notification to said second subscriber to indicate that said modification, requested by said first subscriber, may have changed the result of said second query; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A non-transitory computer-readable storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:
-
receiving, at a database server that manages access to a database, a request from a first subscriber to register a first query to receive change notifications of modifications to the database that may change the result of the first query; said database server registering said first query in response to said request from said first subscriber; receiving, at said database server, a request from a second subscriber to register a second query to receive change notifications of modifications to the database that may change the result of the second query; said database server registering said second query in response to said request from said second subscriber; receiving, at said database server, a request from said first subscriber to make a modification, as part of a database transaction, to the database; said database server determining that said modification may change a result of said first query and said second query; returning to said first subscriber, before said database transaction commits, a notification to indicate that said modification, requested by said first subscriber, may have changed the result of said first query; and after returning said notification to said first subscriber, committing said database transaction and, after said database transaction commits, transmitting a notification to said second subscriber to indicate that said modification may have changed the result of said second query. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
-
Specification