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 Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Securing Your Software Supply Chain with JFrog and Azure
Register Today

Trending

  • Decoding eBPF Observability: How eBPF Transforms Observability as We Know It
  • New ORM Framework for Kotlin
  • Personalized Code Searches Using OpenGrok
  • DevOps in Legacy Systems

Trending

  • Decoding eBPF Observability: How eBPF Transforms Observability as We Know It
  • New ORM Framework for Kotlin
  • Personalized Code Searches Using OpenGrok
  • DevOps in Legacy Systems
  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.

Dmitry Narizhnykh user avatar by
Dmitry Narizhnykh
CORE ·
Updated Aug. 18, 20 · Tutorial
Like (3)
Save
Tweet
Share
15.63K 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.

Trending

  • Decoding eBPF Observability: How eBPF Transforms Observability as We Know It
  • New ORM Framework for Kotlin
  • Personalized Code Searches Using OpenGrok
  • DevOps in Legacy Systems

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: