Time stamping of database records
First Claim
1. For use with a temporal database, a method of processing multiple transactions that read and write data in the database, comprising:
- a) setting a transaction timestamp lower limit when a data item is read to the larger of a time the data item was written and a current timestamp lower limit;
b) setting the transaction timestamp lower limit when a data item is written to the largest of a time the data item was previously written, a time the data item was last read, and the current timestamp lower limit;
c) setting the transaction timestamp lower limit when a time interval is requested by a transaction to the larger of the current lower limit and a start of a time interval requested;
d) setting a transaction timestamp upper limit when a time interval is requested by a transaction to the smaller of a current upper limit and a end of the time interval requested; and
e) assigning a transaction timestamp to a value between said transaction timestamp lower limit and said transaction timestamp upper limit.
4 Assignments
0 Petitions
Accused Products
Abstract
A method of assigning timestamps to data items processed by a transaction. The method sets initial upper and lower limits for a transaction timestamp that will be applied to data items processed by the transaction if the transaction does not abort. The upper and lower limits are incrementally updated as data items are processed and time intervals are requested by the transaction. The lower limit is incrementally updated as data items are processed to ensure that write-write, read-write and write-read conflicts are avoided. A transaction timestamp is selected that is greater than the lower limit, but less than the upper limit.
104 Citations
46 Claims
-
1. For use with a temporal database, a method of processing multiple transactions that read and write data in the database, comprising:
-
a) setting a transaction timestamp lower limit when a data item is read to the larger of a time the data item was written and a current timestamp lower limit;
b) setting the transaction timestamp lower limit when a data item is written to the largest of a time the data item was previously written, a time the data item was last read, and the current timestamp lower limit;
c) setting the transaction timestamp lower limit when a time interval is requested by a transaction to the larger of the current lower limit and a start of a time interval requested;
d) setting a transaction timestamp upper limit when a time interval is requested by a transaction to the smaller of a current upper limit and a end of the time interval requested; and
e) assigning a transaction timestamp to a value between said transaction timestamp lower limit and said transaction timestamp upper limit. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. For use with a temporal database, a method of processing multiple transactions that read and write data in the database, comprising:
-
a) determining whether a time interval has been requested by a transaction;
b) setting a transaction timestamp lower limit when a data item is read to the larger of a time the data item was last written and a previous timestamp lower limit;
c) setting the transaction timestamp lower limit when a data item is written to the largest of a time the data item was previously written, a time the data item was last read, and the previous timestamp lower limit;
d) assigning a transaction timestamp to a value that is greater than the timestamp lower limit when it is determined that a time interval has not been requested by the transaction;
e) setting a transaction timestamp upper limit corresponding to an end of the time interval requested by a transaction;
f) setting a transaction timestamp lower limit which is the larger of the current timestamp lower limit and a start of the interval requested by a transaction; and
,g) assigning a transaction timestamp a value that is greater than the timestamp lower limit and less than or equal to the timestamp upper limit when it is determined that a time interval has been requested by the transaction. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. For use with a temporal database, a method of processing multiple transactions that read and write data in the database, comprising:
-
a) assigning read timestamps to corresponding sets of data items;
b) setting a transaction timestamp lower limit when a data item is read to the larger of a time the data item was written and a previous timestamp lower limit;
c) setting the transaction timestamp lower limit when a data item is written to the largest of a time the data item was previously written, a read timestamp assigned to a set of data items corresponding to the data item being written, and the previous timestamp lower limit;
d) setting a transaction timestamp to a value that is greater than the timestamp lower limit. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31)
-
-
32. For use with a temporal database, a method of processing multiple transactions that read and write data in the database, comprising:
-
a) storing read times in entries of a table that correspond to sets of data items;
b) assigning a transaction timestamp to a transaction;
c) storing a list of all data items read by the transaction;
d) accessing entries in said table that correspond to each data item read by said transaction; and
e) updating the read time of each accessed entry of the table to the transaction timestamp when the transaction timestamp is greater than the read time stored in the entry of the table. - View Dependent Claims (33, 34)
-
-
35. For use with a temporal database, a method of processing multiple transactions that read and write data in the database, comprising:
-
a) restricting write access to a data item when the data item is being read by a transaction;
b) restricting read and write access to a data item when a data item is being written by the transaction;
c) determining whether a time interval has been requested by the transaction;
d) assigning read timestamps to corresponding sets of data items;
e) storing said read timestamps in a read timestamp table;
f) setting a transaction timestamp lower limit when a data item is read to the larger of a time the data item was written and a previous timestamp lower limit;
g) setting the transaction timestamp lower limit when a data item is written to the largest of a time the data item was previously written, a read timestamp stored in the read timestamp table corresponding to the data item being written, and the previous timestamp lower limit;
h) setting a transaction timestamp upper limit corresponding to an end of the time interval requested by the transaction when it is determined that a time interval has been requested by the transaction;
i) assigning the transaction timestamp a value between said transaction timestamp lower limit and said transaction timestamp upper limit;
j) storing in memory a list of each data item read by the transaction;
k) storing in memory a list of each data item inserted by the transaction;
l) storing in memory a list of each data item deleted by the transaction;
m) comparing the transaction timestamp to the time the data item was written for each read, inserted and deleted data item;
n) aborting the transaction when the time a data item written is greater than the transaction timestamp;
o) comparing the transaction timestamp to a value in the read timestamp table that corresponds to each inserted and deleted data item;
p) aborting the transaction when the value in the read timestamp table that corresponds to the inserted and deleted data items is greater than the transaction timestamp;
q) committing the transaction; and
r) setting the read timestamps in the read timestamp table for the corresponding sets of data items to the greater of the transaction timestamp and a previous read timestamp for each data item read. - View Dependent Claims (36, 37, 38, 39)
-
-
40. A method for use with a temporal database during execution of transactions over the database wherein a given transaction may both read and write data within the database comprising:
-
a) setting an initial transaction timestamp lower limit;
b) during a first phase of transaction execution, updating said lower limit based on reading and writing of data so that;
i) if data is being read, updating the time stamp lower limit to a time at least as large as the time the data was written, and ii) if data is being written, updating the time stamp lower limit to a time at least as large as the time the data was previously written or updating the time stamp lower limit to a time as large as the time the data was read;
c) during a second phase of transaction execution, after a request for a current time is processed, evaluating said lower limit based on reading and writing of data so that;
i) if data is being read, and the lower limit is less than the time the data was last written aborting the transaction, ii) if data is being written, and the lower limit is less than the time the data was previously written or the lower limit is less than the time the data was read, aborting the transaction; and
d) committing the transaction by finalizing the reading and writing of data to the database unless the transaction aborted during the second phase of transaction execution. - View Dependent Claims (41, 42, 43, 44, 45, 46)
-
Specification