Multiple data base system, multiple data base synchronize processing program, and multiple data base synchronize processing method

The multi-database system addresses synchronization challenges by using a management server to manage update differences and transmit data asynchronously and synchronously, ensuring consistent database contents and improved transaction processing.

JP2024151592AInactive Publication Date: 2024-10-25FUJITSU LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023065056
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-12
Publication Date
2024-10-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Conventional database synchronization methods, such as multi-master replication, face challenges in maintaining consistent database contents across servers due to conflicts and difficulties in reflecting updated records, leading to potential data misplacement and delayed transaction processing.

Method used

A multi-database system with a management server that manages update differences using a difference management DB and transmission queues, ensuring synchronized reflection of updated records across multiple servers by storing and transmitting differential data asynchronously and synchronously, while managing access and conflicts.

Benefits of technology

The system effectively synchronizes updated records across multiple database servers, ensuring consistent database contents even in the presence of conflicts, reducing data misplacement and improving transaction throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024151592000001_ABST
    Figure 2024151592000001_ABST
Patent Text Reader

Abstract

To synchronize reflection of update record in a plurality of database servers.SOLUTION: A multiple data base system 9 includes a plurality of DB servers 1 and a management server 2. When receiving an update request for a specific record, a DB server 1-1 updates the specific record in an own DB 14 to data of the update request if update difference data for the specific record is not stored in a difference management DB 24, and transmits the updated update difference data for the specific record to the management server 2. When receiving the update difference data for the specific record from the DB server 1-1, the management server 2 stores the update difference data for the specific record in the difference management DB 24, stores a transmission que 25 corresponding to a DB server 1-2 different from the DB server 1-1 and transmits the message que to the DB server 1-2. The DB server 1-2 reflects the transmitted update difference data for the specific record to the own DB 14.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a multi-database system and the like. [Background technology]

[0002] A technology has been disclosed in which a storage device at a main site replicates data stored in the storage device to a storage device at a remote site (see, for example, Patent Documents 1 and 2).

[0003] Also, there is known a multi-master replication, which is a replication technique in which there is no distinction between a main site and a remote site, all servers act as mains, and data is exchanged and integrated without contradiction. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2020-149573 A [Patent Document 2] JP 2007-264946 A Summary of the Invention [Problem to be solved by the invention]

[0005] However, the conventional technology has a problem in that it is difficult to synchronize the reflection of updated records among multiple database servers.

[0006] For example, in a technology that performs replication between a main site and a remote site, the remote site cannot update the main site in the first place, and therefore cannot synchronize the reflection of updated records.

[0007] Furthermore, if a multi-master replication database configuration is simply applied, when there is a conflict in database updates between servers, the updated data may be mixed up even if the servers try to synchronize their databases (reflect differences in DB). For example, if two servers update their databases at almost the same time, when the servers try to synchronize their databases, the databases of each server will reflect each other's updated data, and the updated data may be mixed up. In other words, if multi-master replication is simply applied, it is difficult to keep the databases of all servers constantly with the same content in accordance with the update order.

[0008] In one aspect, the present invention has an object to synchronize the reflection of updated records in a plurality of database servers. [Means for solving the problem]

[0009] In one aspect, a multi-database system includes a first server and a second server each having a database, and a management server that uses update difference information to manage update difference data for a record updated in either the first server or the second server. The first server has a first reflection unit that, upon receiving an update request for a specific record, updates the specific record in its own database to the data requested for update if the update difference data for the specific record is not stored in the update difference information, and transmits the updated update difference data for the specific record to the management server. The management server has a transmission queue, and a difference transmission unit that, upon receiving the update difference data for the specific record from the first server, stores the update difference data for the specific record in the update difference information and in a transmission queue corresponding to the second server different from the first server, and transmits the update difference data to the second server. The second server has a reception queue, and a second reflection unit that stores the transmitted update difference data for the specific record in the reception queue, and reflects it in its own database. Effect of the Invention

[0010] According to one embodiment, the reflection of updated records can be synchronized among multiple database servers. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is a diagram illustrating an example of a functional configuration of a multi-database system according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a data structure of a differential management DB according to the embodiment. [Diagram 3] FIG. 3 is a diagram illustrating an example of a data structure of a sending message queue (receiving message queue) according to the embodiment. [Figure 4A] FIG. 4A is a diagram (1) showing an example of the flow of multi-database synchronization processing according to the embodiment. [Figure 4B] FIG. 4B is a diagram (2) showing an example of the flow of the multi-database synchronization process according to the embodiment. [Figure 4C] FIG. 4C is a diagram (3) showing an example of the flow of the multi-database synchronization process according to the embodiment. [Figure 4D] FIG. 4D is a diagram (4) showing an example of the flow of multi-database synchronization processing according to the embodiment. [Figure 4E] FIG. 4E is a diagram (5) showing an example of the flow of multi-database synchronization processing related to the embodiment. [Figure 4F] FIG. 4F is a diagram (6) showing an example of the flow of the multi-database synchronization process according to the embodiment. [Figure 5A] FIG. 5A is a diagram (1) showing an example of a sequence of multi-database synchronization processing according to the embodiment (when there is no DB update conflict). [Figure 5B] FIG. 5B is a diagram (2) showing an example of the sequence of the multi-database synchronization process according to the embodiment (when there is a DB update conflict). [Figure 6] FIG. 6 is a diagram illustrating an example of a flowchart of the synchronous reflection process according to the embodiment. [Figure 7] FIG. 7 is a diagram illustrating an example of a flowchart of a difference storage process according to the embodiment. [Figure 8] FIG. 8 is a diagram illustrating an example of a flowchart of the asynchronous reflection process according to the embodiment. [Figure 9] FIG. 9 is an example of a flowchart of the difference transmission process according to the embodiment. [Figure 10] FIG. 10 is a diagram illustrating an example of a computer that executes a multi-database synchronization processing program. [Figure 11] FIG. 11 is a reference diagram showing update synchronization in multi-master replication. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, embodiments of the multi-database system, the multi-database synchronization processing program, and the multi-database synchronization processing method disclosed in the present application will be described in detail with reference to the accompanying drawings. Note that the present invention is not limited to the embodiments.

[0013] First, let us explain how updates are synchronized in multi-master replication. Multi-master replication here refers to a replication technique in which all servers act as masters and exchange and integrate data with each other without contradictions. If a database (DB: DataBase) configuration for multi-master replication is simply applied, when there is a conflict in DB updates between servers, the updated data may be mixed up even if the servers try to synchronize their DBs with each other. In other words, if multi-master replication is simply applied, it is difficult to keep the DBs of all servers with the same content at all times according to the update order.

[0014] Therefore, one possible method to avoid conflicts in multi-master replication is to limit access to the DB from the other server during certain time periods, update the DB on your own server, and then reflect the differences in the DB on the other server.

[0015] Fig. 11 is a reference diagram showing synchronization of updates in multi-master replication. As shown in Fig. 11, Server 1 to Server n are each a master server. A DB with the same contents is installed on each server. During a certain time period, access to the DB from Server n is restricted, Server 1 updates the DB, and the difference is reflected in the DB of Server n. During another certain time period, access to the DB from Server 1 is restricted, Server n updates the DB, and the difference is reflected in the DB of Server 1.

[0016] However, there are times when access to the DB is restricted, and transaction processing performed by an application cannot always refer to the latest information from the DB or update the DB.

[0017] In other words, in multi-master replication with time slots, access restrictions are imposed, which causes transaction processing to be delayed for the time period during which the access restrictions are in place. Also, even if there is no contention, if an access restriction is imposed, the access restriction is lifted and processing is transferred to the next server, so transaction processing throughput does not improve.

[0018] Therefore, in the following embodiment, a system capable of synchronizing the reflection of update records in a multi-server configuration with multi-master replication will be described. EXAMPLES

[0019] [Functional configuration of multi-database system] Fig. 1 is a diagram showing an example of a functional configuration of a multi-database system according to an embodiment. As shown in Fig. 1, a multi-database system 9 includes a plurality of DB servers 1-1 to 1-n and a management server 2. The DB servers 1-1 to 1-n are each a master server. DBs 14 having the same contents are installed in the DB servers 1-1 to 1-n. The DB servers 1-1 to 1-n may also be simply referred to as DB servers 1.

[0020] The management server 2 manages the update differences of each DB 14 arranged in each DB server 1. The management server 2 has a difference transmission unit 21, a difference management DB 24, and a transmission message queue 25. The difference management DB 24 is a DB that manages the update differences of each DB 14 arranged in each DB server 1. The transmission message queue 25 is a queue that accumulates transmission messages, and is associated with a later-described reception message queue 15 of the DB server 1. The transmission message queue 25 is used to asynchronously transmit update difference data managed by the difference management DB 24 to the DB server 1. The update difference data referred to here refers to data that has been updated and has become a difference.

[0021] Here, the data structure of the differential management DB 24 will be described with reference to FIG. 2. FIG. 2 is a diagram showing an example of the data structure of the differential management DB according to the embodiment. As shown in FIG. 2, the differential management DB 24 stores a DB identification table name, a server reflection status, a timestamp, a primary key value, and an update difference content in association with each other. The DB identification table name is the name of a table in a tabular format used to identify a DB in which update difference data exists. The server reflection status is the reflection status of the update difference data for each DB server 1. As an example, the server reflection status is set to "Done" indicating that the data has been reflected, or "Not yet" indicating that the data has not been reflected. The timestamp is the date and time when the update difference data was updated in the DB 14 arranged in the DB server 1. The timestamp takes over the timestamp on the update difference record generated by the difference storage unit 12 described later.

[0022] Furthermore, the primary key value is a key value used to identify the area (record) in which the update difference data is stored. The update difference content is the content of the update difference data. That is, when data is updated in any of the DB servers 1, information on the update difference data is added to each update difference record stored in the difference management DB 24. Note that, for example, the DB server 1 can access the difference management DB 24 by remotely connecting to the management server 2 that manages the difference management DB 24 and using SQL, which is a database language.

[0023] Here, the data structure of the transmission message queue 25 will be described with reference to Fig. 3. Fig. 3 is a diagram showing an example of the data structure of the transmission message queue according to the embodiment. As shown in Fig. 3, the transmission message queue 25 stores a DB identification table name, a timestamp, a primary key value, and an update difference content in association with each other. The DB identification table name, the timestamp, the primary key value, and the update difference content correspond to the DB identification table name, the timestamp, the primary key value, and the update difference content of the difference management DB 24, and therefore a description thereof will be omitted. Note that the reception message queue 15 described later has the same data structure as the transmission message queue 25.

[0024] Returning to FIG. 1, the difference transmission unit 21 transmits the update difference data to the DB server 1 asynchronously. For example, when an update difference record is added to the difference management DB 24, the difference transmission unit 21 performs the following process. The difference transmission unit 21 stores the contents of the update difference record in the transmission message queue 25 corresponding to all DB servers 1 other than the DB server 1 that updated the DB 14. The transmission message queue 25 stores a message including the table name, timestamp, primary key value, and update difference contents stored in the update difference record. Then, the difference transmission unit 21 transmits the message on the transmission message queue 25 to the DB server 1 corresponding to the transmission message queue 25. Note that, when there are multiple update difference records, the difference transmission unit 21 may store the contents of all update difference records in the transmission message queue 25 in order of the oldest timestamp, and transmit them to the DB server 1. This allows the difference transmission unit 21 to synchronize the reflection of the update difference data in multiple DB servers 1.

[0025] The DB server 1 has a synchronous reflection unit 11, a differential storage unit 12, an asynchronous reflection unit 13, a DB 14, and a receive message queue 15. The DB 14 is a DB used for business on the multi-database system 9. The business may be, for example, a financial business or a manufacturing business, but may be any business that handles multiple identical DBs 14. The receive message queue 15 is associated with the send message queue 25, and is used to asynchronously reflect differential update data in the DB 14. The data structure of the receive message queue 15 is the same as that of the send message queue 25, and therefore a description thereof will be omitted.

[0026] When there is a request to update or reference a target record in DB14 to be synchronized, the synchronous reflection unit 11 synchronously reflects the DB14 of the other DB server 1. Synchronous reflection of DB14 here means guaranteeing equivalence with DB14 of the other DB server 1 at the timing of updating or referencing data. When there is a request to update or reference a target record, the synchronous reflection unit 11 sends a request to start a transaction lock to the differential management DB24 at the start timing of the request, and sends a request to end the transaction lock at the end timing of the request. The transaction lock here means, for example, a row lock performed in transaction control of a general database.

[0027] For example, when the synchronization reflection unit 11 receives a request to update a target record in the synchronization target DB 14, for which a table name and a primary key value are specified, the synchronization reflection unit 11 reads an update difference record corresponding to the table name and primary key value from the difference management DB 24 of the management server 2. If there is no update difference record as a result of the reading, the synchronization reflection unit 11 updates the target record in its own DB 14 corresponding to the table name and primary key value to the data for which there was an update request.

[0028] Furthermore, if there is an update difference record as a result of reading, the synchronous reflection unit 11 reflects the update difference contents stored in the update difference record in its own DB 14. In addition, the synchronous reflection unit 11 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1. Then, the synchronous reflection unit 11 updates the target record corresponding to the table name and primary key value of its own DB 14 to the data for which there was a request to update. That is, if update difference data for the target record is stored in the update difference record, the synchronous reflection unit 11 reflects the update difference data in its own DB 4 and then updates the data for which there was a request to update in its own DB 4. In this way, the synchronous reflection unit 11 can always synchronize the contents of DB 4 even if there is a DB update conflict in multiple DB servers 1.

[0029] In another example, when the synchronization reflection unit 11 receives a request to refer to a target record in DB 14 to be synchronized, with the table name and primary key value specified, the synchronization reflection unit 11 reads an update difference record corresponding to the table name and primary key value from the difference management DB 24 of the management server 2. If there is no update difference record as a result of the reading, the synchronization reflection unit 11 reads data of the target record corresponding to the table name and primary key value of its own DB 14.

[0030] Furthermore, when the update difference record is found as a result of reading the update difference record, the synchronous reflection unit 11 reflects the update difference contents stored in the update difference record in its own DB 14. In addition, the synchronous reflection unit 11 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1. Then, the synchronous reflection unit 11 reads the target record corresponding to the table name and primary key value of its own DB 14. That is, when update difference data for the target record is stored in the update difference record, the synchronous reflection unit 11 reflects the update difference data in its own DB 4 and then reads the target record. This allows the synchronous reflection unit 11 to always synchronize the contents of DB 4 even if there is a DB update conflict in multiple DB servers 1. As a result, even if any of the DB servers 1 becomes abnormal, the user does not need to be aware of the abnormality and can continue business.

[0031] If there are multiple update difference records, the synchronous reflection unit 11 reflects the update difference data in its own DB 4 in the order of oldest timestamp, and in the case of an update request, updates the data for which an update request was made in its own DB 4. If there are multiple update difference records, the synchronous reflection unit 11 reflects the update difference data in its own DB 4 in the order of oldest timestamp, and in the case of a reference request, reads out the target record. This allows the synchronous reflection unit 11 to guarantee the order of reflection in its own DB 4, and always synchronizes the contents of DB 4.

[0032] The difference storage unit 12 stores the update difference data in the difference management DB 24 at the timing when the record for which an update request has been made is updated in its own DB 14. For example, the difference storage unit 12 generates an update difference record including the table name of its own DB 14, a primary key value, the update difference data, and a current timestamp. The timestamp is the date and time when the update difference data was updated in DB 14. In addition, the difference storage unit 12 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1. Then, the difference storage unit 12 adds the generated update difference record to the difference management DB 24 of the management server 2.

[0033] The asynchronous reflection unit 13 reflects the update difference data asynchronously. Here, the asynchronous reflection of the DB 14 means that equivalence with the DB 14 of the other DB server 1 is guaranteed asynchronously, not at the timing of data update.

[0034] For example, the asynchronous reflection unit 13 stores a message (table name, timestamp, primary key value, and update difference content of the update difference record) asynchronously transmitted from the management server 2 in the received message queue 15. Then, the asynchronous reflection unit 13 reflects the update difference content contained in the message stored in the received message queue 15 to the target record corresponding to the table name and primary key value of its own DB 14. If there are multiple messages stored in the received message queue 15, the asynchronous reflection unit 13 may reflect the messages in order of the oldest timestamp to its own DB 4. In addition, the asynchronous reflection unit 13 sets "Done" in the column corresponding to its own DB server 1 of the server reflection status for the update difference record stored in the difference management DB 24. This allows the asynchronous reflection unit 13 to synchronize the reflection of the update difference data in multiple DB servers 1. As a result, even if any of the DB servers 1 becomes abnormal, the user does not need to be aware of the abnormality and can continue working.

[0035] [Multi-database synchronization process flow] 4A to 4F are diagrams showing an example of the flow of the multi-database synchronization process according to the embodiment. In addition, in FIG. 4A to FIG. 4F, for DB 14 that manages the balance of financial accounts, <1> The account has been opened, <2> The payment has been made, <3> An inquiry was made, <4> The case where a withdrawal is made will be described. Note that the balance DB14' is an example of DB14.

[0036] As shown in Figure 4A, <1> Suppose that person A opens an account. The synchronous reflection unit 11 of the DB server 1-2 receives a request to add a new account number "01" and a new balance "80" to the balance DB 14' (S100). The synchronous reflection unit 11 then reads out an update difference record corresponding to the DB name "balance DB" and the primary key value "01" from the differential management DB 24, but receives a response indicating that there is no match (S101). The synchronous reflection unit 11 then updates the target record corresponding to the balance DB 14' and the primary key value "01" to the balance "80" (S102).

[0037] Next, the difference storage unit 12 stores the contents of the balance DB14' in the difference management DB24 (S103). For example, the difference storage unit 12 generates an update difference record including the DB name "Balance DB", the primary key value "01", the update difference data "80", and the current timestamp. In addition, the difference storage unit 12 sets the server reflection status corresponding to its own DB server 1-2 in the update difference record to "Done". Note that the server reflection status corresponding to DB servers 1 other than its own DB server 1-2 is "Not yet". Then, the difference storage unit 12 adds the update difference record to the difference management DB24.

[0038] Next, as shown in FIG. 4B, since the update difference record has been added to the difference management DB 24, the difference transmission unit 21 of the management server 2 performs the following process. The difference transmission unit 21 stores the contents of the update difference record in the transmission message queues 25 corresponding to all DB servers 1 other than the DB server 1 that updated the balance DB 14'. In this example, the DB server 1 that updated the balance DB 14' is the DB server 1-2. Therefore, the difference transmission unit 21 stores a message including the table name, primary key value, and update difference content of the update difference record in the transmission message queues 25 corresponding to the DB servers 1-1 and 1-3 other than the DB server 1-2 (S110). The message stores the table name "balance DB", the primary key value "01", and the update difference content "80". Then, the difference transmission unit 21 transmits the message on the transmission message queue 25 to the DB servers 1-1 and 1-3 (S111).

[0039] In DB server 1-1, the asynchronous reflection unit 13 extracts a message from the received message queue 15, and reflects the update difference content "80" in the target record corresponding to the primary key value "01" in the balance DB 14' (S111). In addition, the asynchronous reflection unit 13 updates its own server reflection status column in the update difference record in the differential management DB 24 from "Not yet" to "Done" (S112). Similarly, in DB server 1-3, the asynchronous reflection unit 13 performs the same process as in DB server 1-1 (S111, S112). Then, if the server reflection status of the update difference record in the differential management DB 24 has been reflected in all DB servers 1, the asynchronous reflection unit 13 deletes the update difference record (S113).

[0040] As shown in Figure 4C, <2> Suppose that person A deposits "10" into account number "01". The synchronous reflection unit 11 of DB server 1-2 receives a request to add the balance "10" to the account number "01" in the balance DB14' (S120). The synchronous reflection unit 11 then reads out the update difference record corresponding to the DB name "Balance DB" and the primary key value "01" from the differential management DB24, but receives a response indicating no match (S121). The synchronous reflection unit 11 then adds "10" to the target record corresponding to the balance DB14' and the primary key value "01", updating it to "90" (S122).

[0041] Next, the difference storage unit 12 stores the contents of the balance DB14' in the difference management DB24 (S123). For example, the difference storage unit 12 generates an update difference record including the DB name "Balance DB", the primary key value "01", the update difference data "90", and the current timestamp. In addition, the difference storage unit 12 sets the server reflection status corresponding to its own DB server 1-2 in the update difference record to "Done". Then, the difference storage unit 12 adds the update difference record to the difference management DB24.

[0042] Next, as shown in Figure 4D, <3> Suppose an inquiry is made about account number "01." The synchronous reflection unit 11 of DB server 1-1 receives a request to inquire about the balance DB 14' for account number "01" (S130). The synchronous reflection unit 11 then reads the update difference record corresponding to the DB name "Balance DB" and the primary key value "01" from the differential management DB 24, and reflects the update difference content in its own balance DB 14' (S131). Here, the balance of account number "01" in DB server 1-1 is updated from "80" to "90."

[0043] Next, the differential storage unit 12 of the DB server 1-1 updates the server reflection status corresponding to its own DB server 1-1 in the update differential record of the differential management DB 24 from "Not yet" to "Done" (S132). Then, the synchronous reflection unit 11 of the DB server 1-1 notifies the request source of the balance "90" corresponding to the account number "01" in the balance DB 14' (S133).

[0044] Next, as shown in Figure 4E, <4> Suppose a withdrawal has been made to account number "01." The synchronous reflection unit 11 of DB server 1-3 receives a request to debit (subtract) "20" from the balance in balance DB14' for account number "01" (S140). The synchronous reflection unit 11 then reads the update difference record corresponding to the DB name "Balance DB" and primary key value "01" from the differential management DB 24, and reflects the update difference content in its own balance DB14' (S141, S142). Here, the balance of account number "01" in DB server 1-3 is updated from "80" to "90."

[0045] Next, the differential storage unit 12 of the DB server 1-3 updates the server reflection status corresponding to its own DB server 1-3 in the update differential record of the differential management DB 24 from "Not yet" to "Done" (S143). Then, the synchronous reflection unit 11 subtracts "20" from the target record corresponding to the balance DB 14' and the primary key value "01" to update it to "70" (S144).

[0046] Next, the difference storage unit 12 stores the contents of the balance DB14' in the difference management DB24 (S145). For example, the difference storage unit 12 generates an update difference record including the DB name "Balance DB", the primary key value "01", the update difference data "70", and the current timestamp. In addition, the difference storage unit 12 sets the server reflection status corresponding to its own DB server 1-3 in the update difference record to "Done". Then, the difference storage unit 12 adds the update difference record to the difference management DB24.

[0047] Next, as shown in FIG. <4> Since there is an update difference record in the difference management DB 24, the difference transmission unit 21 of the management server 2 performs the following process. Here, one update difference record r1 was generated when the DB server 1-2 updated the update difference content in the balance DB 14' to "90". The other update difference record r2 was generated when the DB server 1-3 updated the update difference content in the balance DB 14' to "70". Note that "90" is stored in the balance corresponding to the account number "01" in the balance DB 14' of the DB server 1-1. "90" is stored in the balance corresponding to the account number "01" in the balance DB 14' of the DB server 1-2. "70" is stored in the balance corresponding to the account number "01" in the balance DB 14' of the DB server 1-3.

[0048] Under such circumstances, since there is an update difference record in the difference management DB 24, the difference transmission unit 21 of the management server 2 performs the following process. For the update difference record r1 with the older timestamp, the difference transmission unit 21 stores it in the transmission message queue 25 corresponding to all DB servers 1-1, 1-3 other than the DB server 1-2 that updated the update difference content to the balance DB 14'. For the update difference record r2, the difference transmission unit 21 stores it in the transmission message queue 25 corresponding to all DB servers 1-1, 1-2 other than the DB server 1-3 that updated the update difference content to the balance DB 14' (S150). Here, the difference transmission unit 21 stores a message including the table name, the primary key value, and the update difference content in the transmission message queue 25 corresponding to the DB servers 1-1, 1-3. The message stores the table name "Balance DB", the primary key value "01", and the update difference content "90". The difference transmission unit 21 stores a message including the table name, the primary key value, and the update difference content in the transmission message queue 25 corresponding to the DB servers 1-1 and 1-2. The message stores the table name "Balance DB", the primary key value "01", and the update difference content "70".

[0049] Then, the difference transmission unit 21 of the management server 2 transmits the messages on each transmission message queue 25 to the DB servers 1-1, 1-2, and 1-3 (S151, S156, S159).

[0050] In DB server 1-1, asynchronous reflection unit 13 extracts a message from received message queue 15, and attempts to reflect update difference content "90" in the target record corresponding to primary key value "01" in balance DB 14'. However, since update difference content "90" has already been reflected in balance DB 14', asynchronous reflection unit 13 does not reflect update difference content "90" in balance DB 14' (S152). In addition, asynchronous reflection unit 13 does nothing to the server reflection status of update difference record r1 in differential management DB 24 (S153). Next, asynchronous reflection unit 13 extracts a message from received message queue 15, and attempts to reflect update difference content "70" in the target record corresponding to primary key value "01" in balance DB 14'. Then, because the update difference content "70" is not reflected in the balance DB 14', the asynchronous reflection unit 13 reflects the update difference content "70" in the target record corresponding to the primary key value "01" in the balance DB 14' (S154). In addition, the asynchronous reflection unit 13 updates the server reflection status column corresponding to itself (DB server 1-1) in the update difference record r2 of the differential management DB 24 from "not yet" to "done" (S155).

[0051] In DB server 1-2, asynchronous reflection unit 13 extracts the message from received message queue 15, and attempts to reflect update difference content "70" in the target record corresponding to primary key value "01" in balance DB 14'. Because update difference content "70" is not reflected in balance DB 14', asynchronous reflection unit 13 reflects update difference content "70" in the target record corresponding to primary key value "01" in balance DB 14' (S157). In addition, asynchronous reflection unit 13 updates the server reflection status column corresponding to itself (DB server 1-2) in update difference record r2 of differential management DB 24 from "not yet" to "done" (S158).

[0052] In DB server 1-3, asynchronous reflection unit 13 extracts a message from received message queue 15 and attempts to reflect update difference content "90" in the target record corresponding to primary key value "01" in balance DB 14'. However, since update difference content "90" has already been reflected in balance DB 14', asynchronous reflection unit 13 does not reflect update difference content "90" in balance DB 14' (S160). In addition, asynchronous reflection unit 13 does nothing to the server reflection status of update difference record r1 in differential management DB 24 (S161).

[0053] Then, any one of the DB servers 1-1, 1-2, 1-3 deletes the update difference records r1 and r2 if the server reflection status of the update difference records r1 and r2 has been reflected in all DB servers 1 (S162).

[0054] [Multi-database synchronization process sequence] 5A is a diagram (1) showing an example of a sequence of a multi-database synchronization process according to an embodiment of the present invention. Note that, in FIG. 5A, a case where there is no contention in updating the DB 14 will be described.

[0055] 5A, DB server 1-1 receives a request from DB user A to update data "a" in a target record in DB 14 (S201). Then, DB server 1-1 sends a request to start a transaction lock to the differential management DB 24 of the management server 2 (S202). As a result, the differential management DB 24 of the management server 2 becomes locked in order to perform exclusive control.

[0056] The DB server 1-1 performs synchronous reflection processing (S203). For example, the DB server 1-1 reads an update difference record corresponding to the target table name and primary key value from the differential management DB 24 of the management server 2, and if there is no update difference record, performs the following processing. The DB server 1-1 updates the target record in its own DB 14 corresponding to the target table name and primary key value to the data "a" for which an update request was made (S204).

[0057] Then, the DB server 1-1 performs a difference storage process on the update difference data (S205). For example, the DB server 1-1 generates an update difference record including the table name of its own DB 14, the primary key value, the update difference data "a" and the current timestamp. In addition, the DB server 1-1 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1-1. Then, the DB server 1-1 stores the generated update difference record in the difference management DB 24 of the management server 2 (S206). The DB server 1-1 that has stored the difference transmits a request to end the transaction lock to the difference management DB 24 of the management server 2 (S207). As a result, the difference management DB 24 of the management server 2 releases the lock. Then, the DB server 1-1 transmits the update result to the DB user A who made the request (S208).

[0058] The management server 2, which has stored the update difference record of DB14 in the difference management DB24, stores the difference message in the sending message queue 25 and sends it (S209, S210). For example, the management server 2 stores the update difference record in the sending message queue 25 corresponding to the DB server 1-2 other than the DB server 1-1 that updated the update difference content "a" in DB14. A message including the table name, timestamp, primary key value and update difference content "a" of the update difference record is stored in the sending message queue 25. Then, the management server 2 sends the message on the sending message queue 25 to the DB server 1-2.

[0059] The DB server 1-2 that received the message performs asynchronous reflection processing (S211). For example, the DB server 1-2 reflects the update difference content "a" in the target record corresponding to the table name and primary key value of its own DB 14 in response to the message on the received message queue 15. In addition, the DB server 1-2 sets "Done" in the column of the server reflection status in the differential management DB 24 that corresponds to its own DB server 1-2.

[0060] Next, DB server 1-2 receives a request from DB user B to update data "b" in the target record in DB 14 (S212). Then, DB server 1-2 sends a transaction lock start request to the differential management DB 24 of management server 2 (S213). As a result, the differential management DB 24 of management server 2 becomes locked in order to perform exclusive control.

[0061] The DB server 1-2 performs synchronous reflection processing (S214). For example, the DB server 1-2 reads an update difference record corresponding to the target table name and primary key value from the differential management DB 24 of the management server 2, and performs the following processing if there is no update difference record. The DB server 1-2 updates the target record in its own DB 14 corresponding to the target table name and primary key value to the data "b" for which an update request was made (S215).

[0062] Then, the DB server 1-2 performs a difference storage process on the update difference data (S216). For example, the DB server 1-2 generates an update difference record including the table name of its own DB14, the primary key value, the update difference data "b", and the current timestamp. In addition, the DB server 1-2 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1-2. Then, the DB server 1-2 stores the generated update difference record in the difference management DB 24 of the management server 2 (S217). The DB server 1-2 that has stored the difference transmits a transaction lock end request to the difference management DB 24 of the management server 2 (S218). As a result, the difference management DB 24 of the management server 2 releases the lock. Then, the DB server 1-2 transmits the update result to the requesting DB user B (S219).

[0063] The management server 2, which has stored the update difference record of DB14 in the difference management DB24, stores the difference message in the sending message queue 25 and sends it (S220, S221). For example, the management server 2 stores the update difference record in the sending message queue 25 corresponding to the DB server 1-1 other than the DB server 1-2 that updated the update difference content "b" in DB14. A message including the table name, timestamp, primary key value and update difference content "b" of the update difference record is stored in the sending message queue 25. Then, the management server 2 sends the message on the sending message queue 25 to the DB server 1-1.

[0064] The DB server 1-1 that receives the message performs asynchronous reflection processing (S222). For example, in response to the message, the DB server 1-2 reflects the update difference content "b" in the target record that corresponds to the table name and primary key value of its own DB 14. In addition, the DB server 1-1 sets "Done" in the column of the server reflection status in the differential management DB 24 that corresponds to its own DB server 1-1.

[0065] 5B is a diagram (2) showing an example of the sequence of the multi-database synchronization process according to the embodiment. Note that, in FIG. 5B, a case where there is a conflict in updating the DB 14 will be described.

[0066] 5B, DB server 1-1 receives a request from DB user A to update data "a" in a target record in DB 14 (S301). Then, DB server 1-1 sends a request to start a transaction lock to the differential management DB 24 of the management server 2 (S302). As a result, the differential management DB 24 of the management server 2 becomes locked in order to perform exclusive control.

[0067] The DB server 1-1 performs synchronous reflection processing (S303). For example, the DB server 1-1 reads an update difference record corresponding to the target table name and primary key value from the differential management DB 24 of the management server 2, and if there is no update difference record, performs the following processing. The DB server 1-1 updates the target record in its own DB 14 corresponding to the target table name and primary key value to the data "a" for which an update request was made (S304).

[0068] Then, the DB server 1-1 performs a difference storage process on the update difference data (S305). For example, the DB server 1-1 generates an update difference record including the table name of its own DB 14, the primary key value, the update difference data "a", and the current timestamp. In addition, the DB server 1-1 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1-1. Then, the DB server 1-1 stores the generated update difference record in the difference management DB 24 (S306). The DB server 1-1 that stored the difference transmits a request to end the transaction lock to the difference management DB 24 of the management server 2 (S307). As a result, the difference management DB 24 of the management server 2 releases the lock. Then, the DB server 1-1 transmits the update result to the DB user A who made the request (S308).

[0069] While the differential management DB 24 is locked, it is assumed that the DB server 1-2 receives a request from DB user B to update the data "b" for the target record in DB 14 (S309). In response, the DB server 1-2 sends a request to start a transaction lock to the differential management DB 24 of the management server 2 (S310). However, since the differential management DB 24 has locked the same target record, the transaction lock start request from the DB server 1-2 is waiting for the lock to be released.

[0070] Then, when the lock on the differential management DB 24 is released, the DB server 1-2 performs synchronous reflection processing (S311, 312). For example, the DB server 1-2 reads the update difference record corresponding to the target table name and primary key value from the differential management DB 24 of the management server 2, and performs the following processing if the update difference record is present. The DB server 1-2 reflects the update difference content "a" stored in the update difference record in its own DB 14 (S313). In addition, the DB server 1-2 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1-2. Then, the DB server 1-2 updates the target record corresponding to the table name and primary key value of its own DB 14 to the data "b" for which an update request was made (S314).

[0071] Then, the DB server 1-2 performs a difference storage process on the update difference data (S315). For example, the DB server 1-2 generates an update difference record including the table name of its own DB14, the primary key value, the update difference data "b", and the current timestamp. In addition, the DB server 1-2 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1-2. Then, the DB server 1-2 stores the generated update difference record in the difference management DB 24 (S316). The DB server 1-2 that stored the difference transmits a request to end the transaction lock to the difference management DB 24 of the management server 2 (S317). As a result, the difference management DB 24 of the management server 2 releases the lock. Then, the DB server 1-2 transmits the update result to the requesting DB user B (S318).

[0072] The management server 2, which has stored the update difference record of DB14 stored in DB server 1-1 in the difference management DB 24, stores the difference message in the sending message queue 25 and sends it (S319, S320). For example, the management server 2 stores the update difference record in the sending message queue 25 corresponding to DB server 1-2 other than DB server 1-1 that updated DB14 with update difference content "a". A message including the table name, timestamp, primary key value and update difference content "a" of the update difference record is stored in the sending message queue 25. Then, the management server 2 sends the message on the sending message queue 25 to DB server 1-2.

[0073] The DB server 1-2 that receives the message performs asynchronous reflection processing (S321). For example, in response to the message, the DB server 1-2 attempts to reflect the update difference content "a" in the target record that corresponds to the table name and primary key value of its own DB 14. However, the DB server 1-2 does nothing because the content has already been reflected by synchronous reflection processing.

[0074] Meanwhile, the management server 2, which has stored the update difference record of DB14 stored in DB server 1-2 in the difference management DB 24, stores the difference message in the transmission message queue 25 and transmits it (S322, S323). For example, the management server 2 stores the update difference record in the transmission message queue 25 corresponding to the DB server 1-1 other than the DB server 1-2 that updated the update difference content "b" in DB14. A message including the table name, timestamp, primary key value and update difference content "b" of the update difference record is stored in the transmission message queue 25. Then, the management server 2 transmits the message on the transmission message queue 25 to the DB server 1-1.

[0075] The DB server 1-1 that receives the message performs asynchronous reflection processing (S324). For example, in response to the message, the DB server 1-1 reflects the update difference content "b" in the target record that corresponds to the table name and primary key value of its own DB 14 (S325). The DB server 1-1 then sets "Done" in the column of the server reflection status in the differential management DB 24 that corresponds to its own DB server 1-1.

[0076] [Synchronization reflection process flowchart] Next, a flowchart of the synchronous reflection process performed by the synchronous reflection unit 11 of the DB server 1 will be described with reference to Fig. 6. Fig. 6 is a diagram showing an example of a flowchart of the synchronous reflection process according to an embodiment. The synchronous reflection process performed by the synchronous reflection unit 11 when an update request is received will be described.

[0077] 6, the synchronous reflection unit 11 judges whether or not there is an update difference record of the same DB 14 (DB whose table name and primary key value match) as the DB 14 requested to be accessed in the DB server 1 on the differential management DB 24 (step S11). If it is judged that there is no update difference record (step S11; No), the synchronous reflection unit 11 proceeds to step S15.

[0078] On the other hand, if it is determined that there is an update difference record (step S11; Yes), the synchronous reflection unit 11 determines whether the server reflection status of the update difference record is reflected by asynchronous reflection of its own DB server 1 (step S12). If it is determined that it is reflected (step S12; No), the synchronous reflection unit 11 proceeds to step S15.

[0079] On the other hand, if it is determined that the update has not been reflected (step S12; Yes), the synchronous reflection unit 11 reflects the update difference content for the update difference record in the DB 14 of its own DB server 1 (step S13).Then, the synchronous reflection unit 11 records that its own DB server 1 has been reflected in the server reflection status of the update difference record on the differential management DB 24 (step S14).Then, the synchronous reflection unit 11 proceeds to step S15.

[0080] In step S15, the synchronous reflection unit 11 updates the target record corresponding to the DB 14 (table name and primary key value) to the data for which the access request was made (step S15), and then the synchronous reflection unit 11 ends the synchronous reflection process.

[0081] [Differential storage process flowchart] Next, a flowchart of the difference storage process performed by the difference storage unit 12 of the DB server 1 will be described with reference to Fig. 7. Fig. 7 is a diagram showing an example of a flowchart of the difference storage process according to an embodiment. It is assumed that the synchronous reflection unit 11 has updated the data for which an access request has been made to the DB 14.

[0082] As shown in Fig. 7, the difference storage unit 12 creates an update difference record and stores it in the difference management DB 24 (step S21). For example, the difference storage unit 12 generates an update difference record including the table name, primary key value, update difference data, and current timestamp of its own DB 14. In addition, the difference storage unit 12 sets "Done" in the column of the server reflection status in the update difference record that corresponds to its own DB server 1. Then, the difference storage unit 12 stores the generated update difference record in the difference management DB 24 of the management server 2. Then, the difference storage unit 12 ends the difference storage process.

[0083] [Flowchart of asynchronous reflection processing] Next, a flowchart of the asynchronous reflection process performed by the asynchronous reflection unit 13 of the DB server 1 will be described with reference to Fig. 8. Fig. 8 is a diagram illustrating an example of a flowchart of the asynchronous reflection process according to the embodiment.

[0084] 8, the asynchronous reflection unit 13 determines whether or not there is an instruction to stop the multi-database system 9 (step S31). If it is determined that there is an instruction to stop (step S31; Yes), the asynchronous reflection unit 13 ends the asynchronous reflection process.

[0085] On the other hand, if it is determined that there is no stop instruction (step S31; No), the asynchronous reflection unit 13 determines whether or not there is a message on the received message queue 15 (step S32). If there are multiple messages, the asynchronous reflection unit 13 processes all messages in order of oldest timestamp in the subsequent processing. If it is determined that there is no message on the received message queue 15 (step S32; No), the asynchronous reflection unit 13 proceeds to step S31.

[0086] On the other hand, if it is determined that there is a message on the received message queue 15 (step S32; Yes), the asynchronous reflection unit 13 performs the following process. The asynchronous reflection unit 13 determines whether the server reflection status of the update difference record on the differential management DB 24 has been reflected by synchronous reflection of its own DB server 1 (step S33). If it is determined that it has been reflected (step S33; No), the asynchronous reflection unit 13 proceeds to step S37.

[0087] On the other hand, if it is determined that the update has not been reflected (step S33; Yes), the asynchronous reflection unit 13 reflects the update difference content of the message in the DB 14 of its own DB server 1 (step S34). Then, the asynchronous reflection unit 13 deletes the message from the received message queue 15 (step S35). Then, the asynchronous reflection unit 13 records in the server reflection status of the update difference record on the differential management DB 24 that the update has been reflected in its own DB server 1 (step S36). Then, the asynchronous reflection unit 13 proceeds to step S37.

[0088] In step S37, the asynchronous reflection unit 13 judges whether the server reflection status of the update difference record on the differential management DB 24 has been reflected on all DB servers 1 (step S37). If it is judged that the update difference record has been reflected on all DB servers 1 (step S37; Yes), the asynchronous reflection unit 13 deletes the update difference record on the differential management DB 24 (step S38). Then, the asynchronous reflection unit 13 proceeds to step S31.

[0089] On the other hand, if it is determined that the data has not been reflected in all of the DB servers 1 (step S37; No), the asynchronous reflection unit 13 proceeds to step S31.

[0090] [Flowchart of differential transmission process] Next, a flowchart of the difference transmission process performed by the difference transmission unit 21 of the management server 2 will be described with reference to Fig. 9. Fig. 9 is a diagram illustrating an example of a flowchart of the difference transmission process according to the embodiment.

[0091] 9, the difference transmission unit 21 determines whether or not there is an instruction to stop the multi-database system 9 (step S41). If it is determined that there is an instruction to stop (step S41; Yes), the difference transmission unit 21 ends the difference transmission process.

[0092] On the other hand, if it is determined that there is no stop instruction (step S41; No), the difference transmission unit 21 determines whether or not an update difference record has been added to the difference management DB 24 (step S42). If there are multiple update difference records, the difference transmission unit 21 processes all of the update difference records in order of oldest timestamp in the subsequent processing. If it is determined that no update difference record has been added (step S42; No), the difference transmission unit 21 proceeds to step S41.

[0093] On the other hand, if it is determined that an update difference record has been added (step S42; Yes), the difference transmission unit 21 stores the contents of the update difference record in the sending message queues 25 of all DB servers 1 other than the DB server 1 that updated the DB 14 (step S43).Then, the difference transmission unit 21 transmits the message on the sending message queue 25 to the receiving message queue 15 (step S44).

[0094] Then, the difference transmission unit 21 deletes the message on the transmission message queue 25 (step S45). Then, the difference transmission unit 21 proceeds to step S41.

[0095] [Effects of the embodiment] According to the above embodiment, the multi-database system 9 includes DB servers 1-1 and 1-2 each having a DB 14, and a management server 2. The management server 2 uses a difference management DB 24 to manage update difference data for a record updated in either one of the DB servers 1-1 and 1-2. When the DB server 1-1 receives an update request for a specific record, if the update difference data for the specific record is not stored in the difference management DB 24, the DB server 1-1 updates the specific record in its own DB 14 to the data requested for update, and transmits the updated update difference data for the specific record to the management server 2. When the management server 2 receives update difference data for the specific record from the DB server 1-1, the management server 2 stores the update difference data for the specific record in the difference management DB 24 and also in the sending message queue 25 corresponding to the DB server 1-2 different from the DB server 1-1, and transmits it to the DB server 1-2. The DB server 1-2 stores the transmitted update difference data for the specific record in the receiving message queue 15, and reflects it in its own DB 14. According to this configuration, the multi-database system 9 can synchronize the reflection of updated records in the multiple DB servers 1 even if there is no primary-secondary relationship between the multiple DB servers 1.

[0096] Furthermore, according to the above embodiment, when update differential data for a specific record is stored in the differential management DB 24, the DB server 1-1 reflects the update differential data stored in the differential management DB 24 in its own DB 14, and then updates it to the data for which an update request has been made. With this configuration, the multi-database system 9 can always synchronize the contents of DB 14 even if there is a DB update conflict among multiple DB servers 1.

[0097] Furthermore, according to the above embodiment, when update differential data for a specific record is stored in the differential management DB 24, the DB server 1-1 releases the lock and then reflects the update differential data stored in the differential management DB 24 in its own DB 14, updating it to the data requested for update. With this configuration, the multi-database system 9 can prevent data from being mixed up between the DB servers 1 even if there is a DB update conflict among multiple DB servers 1.

[0098] Also, according to the above embodiment, the differential management DB 24 stores information on the update difference that is managed for each record, including the update difference data and the reflection status of the DB server 1 having the DB 14. When update difference data for a specific record is stored in the differential management DB 24, if the reflection status of its own DB server 1 is not yet reflected, the DB server 1-1 reflects the update difference data stored in the differential management DB 24 in its own DB 14, updates the reflection status of its own DB server 1 in the differential management DB 24 to a status where it has already been reflected, and updates the specific record to the data requested for update. According to this configuration, the multi-database system 9 uses the differential management DB 24 that manages the reflection status of the DB server 1 for each record, so that the contents of the DB can always be synchronized even if there is a DB update conflict among multiple DB servers 1.

[0099] Furthermore, according to the above embodiment, when the DB server 1-1 receives a request to refer to a specific record, if update difference data for the specific record is stored in the differential management DB 24, the DB server 1-1 reflects the update difference data in its own DB 4 and reads out the specific record for which there is a request to refer to. With this configuration, the DB server 1-1 can always read out the target record after synchronizing the contents of the DB.

[0100] Furthermore, according to the above embodiment, the DB server 1-1 further deletes information on update differences for a specific record when the reflection status of each DB server 1 for the specific record has already been reflected in the differential management DB 24. With this configuration, the multi-database system 9 can reduce the capacity of the differential management DB 24.

[0101] [others] In the above embodiment, each component of the illustrated multi-database system 9 does not necessarily have to be physically configured as illustrated. In other words, the specific manner of distribution and integration of the DB server 1 and management server 2 is not limited to that shown in the figure, and all or part of them can be functionally or physically distributed and integrated in any unit according to various loads, usage conditions, etc. Also, a storage unit (not shown) that stores information such as DB14 and differential management DB24 may be connected to the DB server 1 and management server 2 as an external device via a network.

[0102] In addition, in the multi-database system 9 according to the embodiment, the DB server 1 and the management server 2 are configured to be separate. However, the management server 2 may be configured to be combined with one DB server 1. That is, one DB server 1 has the functions of the management server 2 and the DB server 1, and the other DB server 1 has only the functions of the DB server 1.

[0103] Moreover, the various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. Therefore, an example of a computer that executes a multi-database synchronization processing program that realizes the same functions as the DB server 1 and the management server 2 shown in Fig. 1 will be described below. Fig. 10 is a diagram showing an example of a computer that executes a multi-database synchronization processing program.

[0104] 10, the computer 200 includes a CPU (Central Processing Unit) 203 that executes various arithmetic processes, an input device 215 that accepts data input from a user, and a display device 209. The computer 200 also includes a drive device 213 that reads programs and the like from a storage medium, and a communication I / F (Interface) 217 ​​that transmits and receives data to and from other computers via a network. The computer 200 also includes a memory 201 that temporarily stores various information, and a HDD (Hard Disk Drive) 205. The memory 201, the CPU 203, the HDD 205, the display control unit 207, the display device 209, the drive device 213, the input device 215, and the communication I / F 217 are connected by a bus 219.

[0105] The drive device 213 is, for example, a device for the removable disk 211. The HDD 205 stores a multi-database synchronization processing program 205a and multi-database synchronization processing related information 205b. The communication I / F 217 manages the interface between the network and the inside of the device, and controls the input and output of data from other computers. For example, a modem or a LAN adapter can be used as the communication I / F 217.

[0106] The display device 209 is a display device that displays a cursor, an icon, a tool box, and data such as documents, images, function information, etc. The display device 209 can be, for example, a liquid crystal display or an organic EL (Electroluminescence) display.

[0107] The CPU 203 reads out the multi-database synchronization processing program 205a, expands it in the memory 201, and executes it as a process. Such processes correspond to the respective functional units of the DB server 1 and the management server 2. The multi-database synchronization processing related information 205b includes, for example, the DB 14 and the differential management DB 24. And, for example, the removable disk 211 stores each piece of information such as the multi-database synchronization processing program 205a.

[0108] Incidentally, the multi-database synchronization processing program 205a does not necessarily have to be stored in the HDD 205 from the beginning. For example, the program may be stored in a "portable physical medium" such as a flexible disk (FD), CD-ROM, DVD disk, magneto-optical disk, or IC card that is inserted into the computer 200. Then, the computer 200 may read out the multi-database synchronization processing program 205a from these and execute it.

[0109] Furthermore, the multi-database synchronization processing program described in the above embodiment can be provided to companies and the like that handle a plurality of the same DBs 14 in their operations. [Explanation of symbols]

[0110] 1. Database Server 2 Management Server 9. Multi-database Systems 11 Synchronization reflection section 12 Differential storage section 13 Asynchronous reflection section 14 DB 15 Incoming Message Queue 21 Differential transmission unit 24 Differential management DB 25 Outgoing Message Queue

Claims

1. a first server and a second server each having a database; a management server that uses update difference information to manage update difference data for a record updated by either the first server or the second server, The first server comprises: a first reflection unit which, upon receiving an update request for a specific record, if update difference data for the specific record is not stored in the update difference information, updates the specific record in its own database to data for which an update request has been made, and transmits the updated update difference data for the specific record to the management server; The management server includes: A transmission queue; a difference transmission unit that, upon receiving update difference data for the specific record from the first server, stores the update difference data for the specific record in the update difference information and in the transmission queue corresponding to the second server different from the first server, and transmits the update difference data to the second server, The second server comprises: A receiving queue; a second reflecting unit that stores the transmitted update difference data for the specific record in the receiving queue and reflects the update difference data in its own database; A multi-database system comprising:

2. The first reflection unit includes: When the update difference information stores update difference data for the specific record, the update difference data stored in the update difference information is reflected in the database, and then the database is updated to the data requested to be updated.

2. The multi-database system according to claim 1.

3. The first reflection unit includes: When the update difference information stores update difference data for the specific record, after the lock is released, the update difference data is reflected in the database and updated to the data requested for update.

3. The multi-database system according to claim 2.

4. the update difference information is information on update differences that includes update difference data and a reflection status of a server that includes the database for each record, The first reflection unit includes: When the update difference information stores update difference data for the specific record, if the reflection status of the server is not yet reflected, the update difference data stored in the update difference information is reflected in the server's own database, the reflection status of the update difference information of the server's own server is updated to a status where the update has already been reflected, and the specific record is updated to the data requested for update.

2. The multi-database system according to claim 1.

5. The first reflection unit includes: Additionally, when a request to view a specific record is received, If the update difference information contains update difference data for the specific record, the update difference data is reflected in the database, and the specific record for which the reference request was made is read.

5. The multi-database system according to claim 3 or 4.

6. The second reflection unit includes: When the information is reflected in the own database, the reflected status of the update difference information in the own server is updated to the already reflected status; Regarding the update difference information, when the reflection status of each server for the specific record is in a state where all of the reflections have already been reflected, the update difference information for the specific record is deleted.

2. The multi-database system according to claim 1.

7. when receiving an update request for a specific record, if update difference data for the specific record is not stored in update difference information that manages update difference data for records updated in either its own server or another server, update the specific record in a database included in its own server to the data requested for update; transmitting the updated update difference data for the specific record to a management server that manages the update difference information in order to store the update difference data in the update difference information; When the update difference data stored in the update difference information by the other server is transmitted from the management server to the server, the update difference data is reflected in a database included in the server. A multi-database synchronization processing program that has the processing executed by the server.

8. when receiving update difference data for a specific record from any one of the plurality of servers, storing the update difference data for the specific record in update difference information that manages update difference data for records updated by any one of the plurality of servers; storing the update difference data in a transmission queue corresponding to a server among the plurality of servers that is different from a server that updated the update difference data for the specific record; The update difference data is transmitted to a server corresponding to the transmission queue. A multi-database synchronization processing program that causes the management server to execute the processing.

9. A multi-database synchronization processing method executed by a first server and a second server each having a database, and a management server, comprising: The first server comprises: when receiving an update request for a specific record, if update difference data for the specific record is not stored in update difference information managed by the management server as update difference data for a record updated in either one of the first server or the second server, updates the specific record in its own database to data for which an update request has been made, and transmits the updated update difference data for the specific record to the management server; The management server includes: when receiving update difference data for the specific record from the first server, storing the update difference data for the specific record in the update difference information and in a transmission queue corresponding to the second server different from the first server, and transmitting the update difference data to the second server; The second server comprises: The transmitted update difference data for the specific record is stored in a receiving queue, and is reflected in the own database.

2. A multi-database synchronization processing method comprising:

Citation Information

Patent Citations

  • Storage system and remote copy control method of storage system

    JP2007264946A

  • Storage controller, storage system, storage control method, and storage control program

    JP2020149573A