DATABASE MANAGEMENT METHOD, DATABASE SYSTEM AND MEDIUM
First Claim
1. A method of managing a database which hierarchically includes higher-level and lower-level master nodes,the higher-level and lower-level master nodes each having a database and an index for searching the database,the method comprising:
- when an update instruction for updating the database is issued in any of the lower-level master nodes, generating, by a database processing unit of the lower-level master node, a write set that includes a shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated, and sending the generated write set to a higher-level master node;
comparing, by a database processing unit of the higher-level master node, the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node, and verifying whether a corresponding row of the database that is registered as a target has been updated by a different write set;
aborting, by the database processing unit of the higher-level master node, the write set when the update has been performed, and when the update has not been performed, updating the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index, and generating, by a transaction log processing unit of the higher-level master node, a record of this update as a transaction log;
distributing, by the higher-level master node, the transaction log to the lower-level master nodes including the lower-level master node which has sent the write set; and
updating, by a transaction log processing unit of the lower-level master node, the database of the lower-level master node and the index of the database based on the received transaction log.
1 Assignment
0 Petitions
Accused Products
Abstract
From a lower-level master node to a higher-level master node, a shadow copy expanded in its own memory, a heap tuple map, and a shadow index are sent as a write set, and the higher-level master node, upon reception of the write set, verifies whether an update has already been executed and sends a record of this update as a transaction log to the lower-level master node, enabling efficient database updating without a discrepancy, from the lower-level master node to the higher-level master node, as well as from the higher-level master node to the subordinate lower-level master node.
10 Citations
15 Claims
-
1. A method of managing a database which hierarchically includes higher-level and lower-level master nodes,
the higher-level and lower-level master nodes each having a database and an index for searching the database, the method comprising: -
when an update instruction for updating the database is issued in any of the lower-level master nodes, generating, by a database processing unit of the lower-level master node, a write set that includes a shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated, and sending the generated write set to a higher-level master node; comparing, by a database processing unit of the higher-level master node, the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node, and verifying whether a corresponding row of the database that is registered as a target has been updated by a different write set; aborting, by the database processing unit of the higher-level master node, the write set when the update has been performed, and when the update has not been performed, updating the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index, and generating, by a transaction log processing unit of the higher-level master node, a record of this update as a transaction log; distributing, by the higher-level master node, the transaction log to the lower-level master nodes including the lower-level master node which has sent the write set; and updating, by a transaction log processing unit of the lower-level master node, the database of the lower-level master node and the index of the database based on the received transaction log. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method of managing a database of a higher-level master node in a database hierarchically including the higher-level master node and a lower-level master node,
the higher-level and lower-level master nodes each having a database and an index for searching the database, the method comprising: -
receiving a write set which is generated when an update instruction for updating the database is issued in any of the lower-level master nodes and which is generated by a database processing unit of the lower-level master node, the write set including shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated; comparing, by a database processing unit of the higher-level master node, the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node, and verifying whether a corresponding row of the database that is registered as a target has been updated by a different write set; and aborting, by the database processing unit of the higher-level master node, the write set when the update has been performed, and when the update has not been performed, updating the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index. - View Dependent Claims (7)
-
-
8. A method of managing a database of a lower-level master node in a database hierarchically including a higher-level master node and the lower-level master node,
the higher-level and lower-level master nodes each having a database and an index for searching the database, the method comprising: -
when an update instruction for updating the database is issued in any of the lower-level master nodes, generating, by a database processing unit of the lower-level master node, a write set that includes a shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated, and sending the generated write set to a higher-level master node in order to cause the higher-level master node to compare the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node, verify whether a corresponding row of the database that is registered as a target has been updated by a different write set, abort the write set when the update has been performed, and when the update has not been performed, update the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index, generate a record of this update as a transaction log, and distribute the transaction log to the lower-level master nodes including the lower-level master node which has sent the write set; and updating, by a transaction log processing unit of the lower-level master node upon reception of the transaction log, the database of the lower-level master node and the index of the database based on the received transaction log. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A database system which hierarchically includes higher-level and lower-level master nodes,
the higher-level and lower-level master nodes each having a database and an index for searching the database, the database system comprising: -
a unit for, when an update instruction for updating the database is issued in any of the lower-level master nodes, generating in the lower-level master node where the update instruction is generated a write set that includes a shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated, and sending the generated write set to a higher-level master node; a unit for, in the higher-level master node, comparing the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node and verifying whether a corresponding row of the database that is registered as a target has been updated by a different write set; a unit for, in the higher-level master node, aborting the write set when the update has been performed, and when the update has not been performed, updating the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index, and generating a record of this update as a transaction log; a unit for, in the higher-level master node, distributing the transaction log to the lower-level master nodes including the lower-level master node which has sent the write set; and a unit for, in the lower-level master node, updating the database of the lower-level master node and the index of the database based on the received transaction log.
-
-
14. A computer-readable non-transitory medium on which is recorded a program for causing a higher-level master node of a database hierarchically including the higher-level master node and a lower-level master node which each have a database and an index for searching the database, to execute the steps of:
-
receiving a write set which is generated when an update instruction for updating the database is issued in any of the lower-level master nodes and which is generated by a database processing unit of the lower-level master node, the write set including shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated; comparing the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node, and verifying whether a corresponding row of the database that is registered as a target has been updated by a different write set; and aborting the write set when the update has been performed, and when the update has not been performed, updating the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index.
-
-
15. A computer-readable non-transitory medium on which is recorded a program for causing a lower-level master node of a database hierarchically including a higher-level master node and the lower-level master node which each have a database and an index for searching the database, to execute the steps of:
-
when an update instruction for updating the database is issued in any of the lower-level master nodes, generating a write set that includes a shadow copy expanded in a memory of the lower-level master node and showing updated contents of the database resulted by the update instruction, a heap tuple map showing a row that is a target of the update instruction, and a shadow index showing contents to be added in the index when the database is updated, and sending the generated write set to a higher-level master node in order to cause the higher-level master node to compare the heap tuple map of the write set received from the lower-level master node with the database of the higher-level master node, verify whether a corresponding row of the database that is registered as a target has been updated by a different write set, abort the write set when the update has been performed, and when the update has not been performed, update the database of the higher-level master node and the index of the database by using the shadow copy and the shadow index, generate a record of this update as a transaction log, and distribute the transaction log to the lower-level master nodes including the lower-level master node which has sent the write set; and updating, upon reception of the transaction log, the database of the lower-level master node and the index of the database based on the received transaction log.
-
Specification