Patent ID: 9740727
Date: 2017-08-22
CPC Classifications: G06F

Claim:
1. A method for replicating databases, in which method at least two databases are replicated, each database having one or more tables, and each table having data and a unique tree index that includes index keys and hierarchical sums of cyclic redundancy check values calculated from the data on each tree index level, the method comprising: receiving data from a data source; storing, in each database, the received data in a respective table in real time; maintaining, as data is stored in the respective tables of each database, logical consistency of the data between corresponding tables in the databases by comparing the sums of cyclic redundancy check values of the database tables continuously at run time; if a difference between the sums of the cyclic redundancy check values is found, logically dividing the tree indexes into two sub tree indexes, and comparing the sums of the cyclic redundancy check values of the sub tree indexes to each other; continuing the comparison of cyclic redundancy check values and division of tree indexes until inconsistent data causing the difference is found; and replicating the inconsistent data between the databases; wherein each tree index comprises a plurality of leaf nodes, a plurality of internal nodes, a root node, and a sum of all cyclic redundancy check values, each leaf node comprising cyclic redundancy check values for data stored in the respective tables of the respective database and corresponding index keys, each internal node comprising sums of cyclic redundancy check values for corresponding leaf nodes and corresponding index keys, and each root node comprising sums of cyclic redundancy check values for corresponding internal nodes and corresponding index keys.