A method of managing a database which is a recordable database hierarchically including higher-level and lower-level master nodes which can be updated by deleting a record of an original row number and writing a record of a new row number, comprising: generating, in a session of any one of the lower-level master nodes, a write set for a plurality of tables to be updated in the database of the lower-level master node, the write set including: table numbers of the plurality of tables; a shadow copy of a database of a lower-level master node, the shadow copy including a copy of a record specified by a row number that should undergo rewriting with reference to the database of the lower-level master node, and a heap tuple map, having registration of the original row number and the new row number in the way of being associated with each other, deployed on a memory of the lower-level master node itself, sending, by the lower-level master node, the write set to the higher-level master node; notifying, by the higher-level master node, when an instruction for locking a table of a database is generated, the lower-level master node of information of the locking, and storing the locking information in the higher-level master node; comparing, by the higher-level master node, the table numbers in the write set received from the lower-level master node and the stored locking information, and aborting the write set when there is contention; aborting, by the lower-level master node that has received the locking information from the higher-level master node, a transaction in the lower-level master node when there is a transaction to be performed to the table that is a target of the locking information; and locking, by the lower-level master node, the target table based on the locking information from the higher-level master node; comparing, by the higher-level master node, the heap tuple map in the write set and the database of the higher-level master node when the write set is received by the higher-level master node but is not aborted upon comparison with the locking information, and verifying whether the tuple registered as a target has been updated in the database; aborting the write set when the tuple registered as a target has been updated; updating the database of the higher-level master node using the shadow copy when the tuple registered as a target has not been updated, creating a record of the update as a transaction log, and sending the transaction log to the lower-level master node; and updating, by the lower-level master node that has received the transaction log, the database of the lower-level master node based on the transaction log. generating, in a session of any one of the lower-level master nodes, a write set for a plurality of tables to be updated in the database of the lower-level master node, the write set including: table numbers of the plurality of tables; a shadow copy of a database of a lower-level master node, the shadow copy including a copy of a record specified by a row number that should undergo rewriting with reference to the database of the lower-level master node, and table numbers of the plurality of tables; a shadow copy of a database of a lower-level master node, the shadow copy including a copy of a record specified by a row number that should undergo rewriting with reference to the database of the lower-level master node, and a heap tuple map, having registration of the original row number and the new row number in the way of being associated with each other, deployed on a memory of the lower-level master node itself, sending, by the lower-level master node, the write set to the higher-level master node; notifying, by the higher-level master node, when an instruction for locking a table of a database is generated, the lower-level master node of information of the locking, and storing the locking information in the higher-level master node; comparing, by the higher-level master node, the table numbers in the write set received from the lower-level master node and the stored locking information, and aborting the write set when there is contention; aborting, by the lower-level master node that has received the locking information from the higher-level master node, a transaction in the lower-level master node when there is a transaction to be performed to the table that is a target of the locking information; and locking, by the lower-level master node, the target table based on the locking information from the higher-level master node; comparing, by the higher-level master node, the heap tuple map in the write set and the database of the higher-level master node when the write set is received by the higher-level master node but is not aborted upon comparison with the locking information, and verifying whether the tuple registered as a target has been updated in the database; aborting the write set when the tuple registered as a target has been updated; updating the database of the higher-level master node using the shadow copy when the tuple registered as a target has not been updated, creating a record of the update as a transaction log, and sending the transaction log to the lower-level master node; and updating, by the lower-level master node that has received the transaction log, the database of the lower-level master node based on the transaction log.