The invention relates to synchronizing and updating records in databases.
Often, data and information maintained on a number of remote database systems must be transferred to and consolidated on a central database. Since the data and information stored in the various databases change, e.g., through addition and deletion of data, the central database and the remote database systems have to be “synchronized.” Synchronization is defined as a process by which two disparate application databases exchange data so that their contents become substantially identical.
Typically, during synchronization, changes in the remote database and the central database are transferred between the remote database and the central database. For example, after the central database is updated, the central database sends to the remote database a confirmation of the changes made. During the same message exchange, the central database may also transmit to the remote database changes in the central database that are of interest to the remote database.
The remote and central devices performing the synchronization of the databases are typically “connected.” Connected devices have a predetermined turnaround latency. In other words, once a device sends a request for synchronization to another device, the connection will time out if the other device does not acknowledge the synchronization request from the first device within the predetermined latency time period. Examples for connected environments are the Starfish™ multi-point synchronization protocols and the active synchronization protocol from Microsoft® that operates in a Windows CE™ environment.
Before the databases can be synchronized, a synchronization mode is negotiated. Four different synchronization modes are typically available: (1) Fast Sync mode (both sides agree to send only additions, modifications, and deletions that occurred in the respective databases since the last synchronization was exchanged); (2) Semi-fast Sync mode (both sides agree to send to a database only additions and modifications, but not deletions; the responder is responsible for determining deletions that occurred since the last synchronization based on differences in the list of records); (3) Slow Sync mode (all records are exchanged; synchronization is performed based on unique record IDs and contains a full history file of previous synchronizations; a comparison of the full records themselves is not required; even applications capable of supporting Fast Sync may need to perform Slow Sync synchronization in certain cases); and (4) Full Re-Sync mode (all records are compared based on the full record contents, rather than on the history file as in “Slow Sync” mode and exchanged, except for records excluded by a filter; filters exclude, e.g., records that exceed a certain size).
Database updates have four important features: (1) consistency (a database is transformed or updated from one consistent state to another consistent state); (2) isolation (a transaction remains invisible to a user until successfully executed); (3) durability (the update survives even if this system subsequently crashes), and, more importantly, (4) atomicity (all changes are made or no changes are made at all). With atomicity, a successful execution of the last change request ensures that all requested changes were executed successfully.