Optimized database technique to enable faster data synchronization
First Claim
1. A method for synchronizing data records between plural databases comprising the steps of:
- a) designating a first database as a source database and a second database as a target database;
b) determining a state of a first modification flag and a second modification flag, said first modification flag contained in a first data record in said source database, said second modification flag contained in a first data record in said target database, wherein said first modification flag indicates that said first data record in said source database has been modified and wherein a value of said first modification flag, indicative of a particular event, is set upon an occurrence of said particular event, wherein said second modification flag indicates that said first data record in said target database has been modified and wherein a value of said second modification flag, indicative of a second particular event, is set upon an occurrence of said second particular event;
c) provided that said first modification flag is set and said second modification flag is not set, propagating said first data record in said source database to said first data record in said target database;
d) provided that said first modification flag is not set, comparing a first modification count contained in said first data record in said source database with a second modification count contained in said first data record in said target database, said first and second modification counts each being a value indicating how many times said first data record in said source database and said first data record in said target database has been modified respectively;
e) provided that said first modification count has a higher value than said second modification count, propagating said first data record in said source database to said first data record in said target database, wherein said steps a) through e) can be completed without comparing raw data of said first data record and said corresponding data record;
f) incrementing said second modification count to said high value of said first modification count;
g) repeating said steps a) through f) until all of said data records in said source database have been processed; and
h) re-designating said second database as said source database and said first database as said target database; and
i) performing said steps a) through g) until all of said data records in said source database have been processed,wherein said step c) comprises the step of marking said first data record as deleted in said target database, provided that said first modification flag is set to indicate that said first data record has been deleted from said source database and that said first data record exists and is not already marked as deleted in said target database.
4 Assignments
0 Petitions
Accused Products
Abstract
Method and system that enables faster data synchronization between different databases. In one embodiment, a method for synchronizing data records between databases is provided. Initially, a first database is designated as a source database and a second database as a target database. The modification flag of a first data record in the source database is examined. If the first modification flag is set, the first data record is propagated to the target database. On the other hand, if the first modification flag is not set, a first modification count of the first data record is compared with a second modification count of a corresponding data record in the target database. In this embodiment, each of the modification counts is a value indicating how many times the respective data record has been modified. If it is determined that the first modification count has a higher value than the second modification count, the corresponding data record is updated according to the first data record. Importantly, the method of this embodiment can be carried out as described without comparing the raw data of the data records. As such, this embodiment of the present invention advantageously eliminates the record-by-record comparison that is inherent in the prior art synchronization process and the inconvenience associated therewith and provides an efficient data synchronization technique that can be beneficially utilized in numerous applications.
-
Citations
18 Claims
-
1. A method for synchronizing data records between plural databases comprising the steps of:
-
a) designating a first database as a source database and a second database as a target database; b) determining a state of a first modification flag and a second modification flag, said first modification flag contained in a first data record in said source database, said second modification flag contained in a first data record in said target database, wherein said first modification flag indicates that said first data record in said source database has been modified and wherein a value of said first modification flag, indicative of a particular event, is set upon an occurrence of said particular event, wherein said second modification flag indicates that said first data record in said target database has been modified and wherein a value of said second modification flag, indicative of a second particular event, is set upon an occurrence of said second particular event; c) provided that said first modification flag is set and said second modification flag is not set, propagating said first data record in said source database to said first data record in said target database; d) provided that said first modification flag is not set, comparing a first modification count contained in said first data record in said source database with a second modification count contained in said first data record in said target database, said first and second modification counts each being a value indicating how many times said first data record in said source database and said first data record in said target database has been modified respectively; e) provided that said first modification count has a higher value than said second modification count, propagating said first data record in said source database to said first data record in said target database, wherein said steps a) through e) can be completed without comparing raw data of said first data record and said corresponding data record; f) incrementing said second modification count to said high value of said first modification count; g) repeating said steps a) through f) until all of said data records in said source database have been processed; and h) re-designating said second database as said source database and said first database as said target database; and i) performing said steps a) through g) until all of said data records in said source database have been processed, wherein said step c) comprises the step of marking said first data record as deleted in said target database, provided that said first modification flag is set to indicate that said first data record has been deleted from said source database and that said first data record exists and is not already marked as deleted in said target database. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer system comprising a processor coupled to a bus and a memory unit coupled to said bus, said memory unit having stored therein instructions that when executed implement a method for synchronizing data records between databases, said method comprising the steps of:
-
a) designating a first database as a source database and a second database as a target database, said first database residing in said memory unit of said computer system; b) determining a state of a first modification flag and a second modification flag, said first modification flag contained in a first data record in said source database, said second modification flag contained in a first data record in said target database, wherein said first modification flag indicates that said first data record in said source database has been modified and wherein a value of said first modification flag, indicative of a particular event, is set upon an occurrence of said particular event, wherein said second modification flag indicates that said first data record in said target database has been modified and wherein a value of said second modification flag, indicative of a second particular event, is set upon an occurrence of said second particular event; c) provided that said first modification flag is set and said second modification flag is not set, propagating said first data record in said source database to said first data record in said target database; d) provided that said first modification flag is not set, comparing a first modification count contained in said first data record in said source database with a second modification count contained in said first data record in said target database, said first and second modification counts each being a value indicating how many times said first data record in said source database and said first data record in said target database has been modified respectively; e) provided that said first modification count has a higher value than said second modification count, propagating said first data record in said source database to said first data record in said target database, wherein said steps a) through e) can be completed without comparing raw data of said first data record and said corresponding data record; f) incrementing said second modification count to said high value of said first modification count; g) repeating steps a) through f) until all of said data records in said source database have been processed; h) re-designating said second database as said source database and said first database as said target database; and i) performing said steps a) through g) until all of said data records in said source database have been processed, wherein said step c) of said method comprises the step of marking said first data record as deleted in said target database, provided that said first modification flag is set to indicate that said first data record has been deleted from said source database and that said first data record exists and is not already marked as deleted in said target database. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer readable medium having embodied therein computer readable code for causing a computer system to implement a method for synchronizing data records between databases, said method comprising the steps of:
-
a) designating a first database as a source database and a second database as a target database; b) determining a state of a first modification flag and a second modification flag, said first modification flag contained in a first data record in said source database, said second modification flag contained in a first data record in said target database, wherein said first modification flag indicates that said first data record in said source database has been modified and wherein a value of said first modification flag, indicative of a particular event, is set upon an occurrence of said particular event, wherein said second modification flag indicates that said first data record in said target database has been modified and wherein a value of said second modification flag, indicative of a second particular event, is set upon an occurrence of said second particular event; c) provided that said first modification flag is set and said second modification flag is not set, propagating said first data record in said source database to said first data record in said target database; d) provided that said first modification flag is not set, comparing a first modification count contained in said first data record in said source database with a second modification count contained in said first data record in said target database, said first and second modification counts each being a value indicating how many times said first data record in said source database and said first data record in said target database has been modified respectively; e) provided that said first modification count has a higher value than said second modification count, propagating said first data record in said source database to said first data record in said target database, wherein said steps a) through e) can be completed without comparing raw data of said first data record and said corresponding data record; f) incrementing said second modification count to said higher value of said first modification count; g) repeating said steps a) through f) until all of said data records in said source database have been processed; h) re-designating said second database as said source database and said first database as said target database; and i) performing steps a) through g) repeatedly until all of said data records in said source database have been processed, wherein said step c) of said method comprises the step of marking said first data record as deleted in said target database, provided that said first modification flag is set to indicate that said first data record has been deleted from said source database and that said first data record exists and is not already marked as deleted in said target database. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification