What is Database synchronization?

Ellen Vasil
DBConvert Blog
Published in
3 min readDec 10, 2018
Photo by Shahadat Rahman on Unsplash

Database synchronization is the process of establishing data consistency between two or more databases, automatically copying changes back and forth. Harmonization of the data over time should be performed continuously. Pulling out data from source (master) database to destination (slave) is the most trivial case.

This article describes one-way database synchronization. Below you can find information about various types of synchronization:

  • Insert Synchronization
  • Update Synchronization
  • Drop Synchronization
  • Mixed Synchronization

Insert Database Synchronization

New records from Source table will be transferred to Target automatically, in case there are no appropriate records in destination table with identical Primary Key values. As a result of DBSync process absent records will be inserted into slave tables.

The following scheme illustrates insert synchronization process.

Update Database Synchronization

When changes in source database occur, appropriate changes in target db have to be performed. Synchronizer compares records’ values at first. Then altered records will be replaced at destination tables in order to establish identity between two tables. As a result of update synchronization all your data keep updated.

Given below picture illustrates update sync process.

Drop Database Synchronization

If some records have been deleted from a source, corresponding records have to be deleted from destination as well. With checked Drop-sync option, these obsolete records will be removed from target if they do not exist in source.

Drop sync process is shown schematically below.

Mixed Database Synchronization

For example, you’ve made modifications in your source tables, added completely new records, and removed obsolete rows. In order to keep your databases in relevance you have to add, delete, and update these correspondent records in destination database. Insert Sync, Update Sync and Drop Sync options checked all together allow you getting entirely identical source and target databases.

See a picture below which shows how Insert, Update and Drop sync options work together.

NOTE: Synchronization works on the base of Primary Key constraint. The tables structures should contain Primary Key or an Unique/Primary index.

DBSync software is able to carry out both one-way and Bi-Directional sync jobs.

DBSync synchronization options

Originally published at https://support.dbconvert.com

--

--