DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • The Aggregate Reference Problem
  • The Serverless Ceiling: Designing Write-Heavy Backends With Aurora Limitless
  • Jakarta Query: Unifying Queries Across SQL and NoSQL in Jakarta EE 12
  • Database Choices for Real-World Applications Cheat Sheet

Trending

  • Why AI-Generated Code Breaks Your Testing Assumptions
  • Build Self-Managing Data Pipelines With an LLM Agent
  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Building a Production-Ready AI Agent in 2026: Beyond the Hello World Demo
  1. DZone
  2. Data Engineering
  3. Databases
  4. What Is Database Synchronization?

What Is Database Synchronization?

Here you can find information about various types of synchronization: Insert, Update, Drop, Mixed.

By 
Dmitry Narizhnykh user avatar
Dmitry Narizhnykh
DZone Core CORE ·
Updated Aug. 18, 20 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
17.9K Views

Join the DZone community and get the full member experience.

Join For Free


Database synchronization establishes 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.

NOTE: Synchronization works on the base of Primary Key constraint. The structures of Databases should contain Primary Key or a Unique or Primary index, not a composite one.

Below you can find information about various types of synchronization:

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

Insert Database Synchronization

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

The following scheme illustrates the "Insert synchronization process".

 

Update Database Synchronization

When changes in the 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 to establish the 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 the destination. With the checked "Drop-sync option," these old records will be removed from the target if they do not exist in the source.

The 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. To keep your databases in relevance, you have to add, delete, and update these correspondent records in the destination database.

The picture below shows how Insert, Update and Drop sync options work together.


Check out cross-database conversion and synchronization software that migrates data between the most popular on-premises databases, including SQL Server, MySQL, Oracle, PostgreSQL. 

Cloud Platforms like AWS RDS/ Aurora, Microsoft Azure SQL, Google Cloud SQL are supported.

Database Relational database

Published at DZone with permission of Dmitry Narizhnykh. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Aggregate Reference Problem
  • The Serverless Ceiling: Designing Write-Heavy Backends With Aurora Limitless
  • Jakarta Query: Unifying Queries Across SQL and NoSQL in Jakarta EE 12
  • Database Choices for Real-World Applications Cheat Sheet

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook