Method for controlling query and update processing in a database system
First Claim
1. A method of controlling query and update processing in a database system, comprising the steps ofin response to a database update transaction containing data insert and delete commands,(A) inserting data entries into the database marked as being part of a future database structure, and(B) marking data entries to be deleted as being part of the present database structure,at the completion of steps A and B, setting a system state parameter to a prescribed state indicating a switch from the present database structure to the future database structure, whereby the future database structure immediately becomes the present database structure and the prior present database structure immediately becomes an old database structure,in response to a database query, determining if any data entries which match the query belong to the present, to an old or to a future database structure, andresponding to the query with only data entries that belong to the present database structure.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of performing update transactions in a database system to perserve consistent logical data states at all times. Each changeable data entry in the database is associated with an individual code field. When no update transaction is in progress, every code field is set to a first value. An update transaction is begun by changing a system state parameter from a NON-UPDATE to an UPDATE state. During the UPDATE state, the code fields of data entries to be added are marked with a second value and then inserted into the database. Code fields of entries to be deleted are marked with a third value. When this is complete, the system state parameter is set to a POST-UPDATE state. All code fields are then returned to the first value at which time the system is returned to the NON-UPDATE state. During the UPDATE state, all queries are given access to entries with first and third code field value. Conversely during the POST-UPDATE state, queries are allowed access only to entries with first and second code field values.
96 Citations
6 Claims
-
1. A method of controlling query and update processing in a database system, comprising the steps of
in response to a database update transaction containing data insert and delete commands, (A) inserting data entries into the database marked as being part of a future database structure, and (B) marking data entries to be deleted as being part of the present database structure, at the completion of steps A and B, setting a system state parameter to a prescribed state indicating a switch from the present database structure to the future database structure, whereby the future database structure immediately becomes the present database structure and the prior present database structure immediately becomes an old database structure, in response to a database query, determining if any data entries which match the query belong to the present, to an old or to a future database structure, and responding to the query with only data entries that belong to the present database structure.
-
3. A method of controlling query and update processing in a database system, comprising the steps of
(A) setting a state parameter to an UPDATE state at the beginning of a database update transaction, (B) during the UPDATE state, inserting new entries of data marked as being part of a new data structure into the database and marking entries to be deleted from the database as being part of an old data structure, (C) in response to database queries received during the UPDATE state, returning only entries satisfying the query that are marked as being part of either the old or a present database, and (D) setting the state parameter to a POST-UPDATE state at the completion of step B, (E) during the POST-UPDATE state, marking all inserted entires as being part of the present database and erasing all entries marked for deletion, (F) in response to a query received during the POST-UPDATE state, returning only entires that match the query and are marked as being part of either the present or the new data structure, and (G) setting the state parameter to a NON-UPDATE state at the completion of the POST-UPDATE state.
-
6. A method of controlling query and update processing in a database system, comprising the steps of
setting a system state parameter to a NON-UPDATE state after the completion of a first database update transaction, setting the state parameter to an UPDATE state at the beginning of a second update transaction, responsive to insert commands in the second transaction, inserting a new database record into the database for each insert command and simultaneously setting a code field associated with the new record to a first value, responsive to each delete command in the second transaction, setting the associated code field of an identified record to be deleted to a second value, setting the state parameter to a POST-UPDATE state at the completion of the last two steps, during the post-UPDATE state, for each record identified in the second transaction, deleting the record if its associated code field is set to the second value and otherwise changing the value of the code field to a third value, setting the state parameter to the NON-UPDATE state at the completion of the last step, in response to a database query identifying match criteria of a record to be accessed, rejecting the query operation unless the system state parameter is set to the NON-UPDATE state and the associated code field of any record satisfying the match criteria is set to the third value, or the state parameter is set to the UPDATE state and the associated code field of any record satisfying the match criteria is set to the second or third values, or the state parameter is set to the POST-UPDATE state and the associated code field of any record satisfying the match criteria is set to the first or third values.
Specification