The invention relates to an incremental
data synchronization method based on
primary key combination. The method comprises the steps that a mapping relation is established, keys of the mapping relation are formed by combining table names and main key values, and the values of the mapping relation are corresponding DML records; dML records are collected from the source
library, whether main keys of the DML records exist in the mapping or not is checked, and if not, the DML records are directly added into the mapping; if yes, taking out the
record of the same
primary key from the mapping as an original
record, and taking the DML
record as a new record; if the type of the DML record is deelete, adding the original record and the new record into a sending
queue; if the record is update, the original record and the new record are merged; if so, adding the original record into a sending
queue, and adding the new record into mapping; and when the transaction is submitted, traversing all residual DML records in the mapping, writing the DML records into a sending
queue, and sending the DML records to a downstream
system for
processing. According to the method, by optimizing the
processing flow of the DML records related to incremental migration, rapid merging and efficient synchronization of incremental data are achieved, and the efficiency and accuracy of
data synchronization are improved.