Data Replication


Data replication means copying the data at multiple locations to improve the availability of data. It is used to remove the inconsistency between the same data which results in a distributed database so that users can do their own task without interrupting the work of other users. There are various types of Data Replication in DBMS as follow −

Types of Data Replication

Transactional Replication

It makes a full copy of the database along with the changed data. Transactional consistency is guaranteed because the order of data is the same when copied from publisher to subscriber database. It is used in server-to-server environments by consistently and accurately replicating changes in the database.

Snapshot Replication

It is the simplest type that distributes data exactly as it appears at a particular moment of time regardless of any updates in data. It copies the 'snapshot' of the data. It is useful when the database changes infrequently. It is slower to Transactional Replication because the data is sent in bulk from one end to another. It is generally used in cases where subscribers do not need the updated data and are operating in read-only mode.

Merge Replication

It combines data from several databases into a single database. It is the most complex type of replication because changes in the database can be done by both publisher and subscriber. It is used in server-to-client environments and has changes sent from one publisher to multiple subscribers.

Data Allocation

It is the process to decide where exactly you want to store the data in the database. Also involves the decision as to which data type of data has to be stored at what particular location. Three main types of data allocation are centralised, partitioned and replicated.

Centralises − Entire database is stored at a single site. No data distribution occurs.

Partitioned − The database gets divided into different fragments which are stored at several sites.

Replicated − Copies of the database are stored at different locations so as to access the data.

Several other types of data replication

Master-Slave replication

In this, database servers are used as master and slave. One database is assigned as master while one or more others are assigned as slave. Master are provided the operations and then slave gets the copy of data from master.

Multi-master replication

In this, everyone is treated as master. All servers can receive operations and any changes or updation made in any server will reflect to all provided servers.

Peer-to-peer replication

In this, any server can be master or slave and the data that is being replicated is in peer-to-peer fashion.

Single-source replication

Multiple databases are being replicated by a single source database.

Conclusion

This article consists of data replication in which data is copied at multiple locations. Types of replication are Transactional Replication which make full copy of database along with the changes that occur, followed by Snapshot Replication which copies the snapshot of data to distribute and last one is Merge Replication which combines data to a single database. Third part comes with Data Allocation which tells us where to store the data. Also, several other types are present i.e. Master-Slave replication, Multi-master replication, Peer-to-peer replication and Single-source replication.

Updated on: 22-Aug-2023

431 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements