Database Replication enables data from one data server (master) to be copied to one or more database (slave) servers. Depending upon the configuration asynchronous or synchronous replication is possible. You can replicate all databases or single database or single table.
There are two types of replication
- Statement Based
Every query excluding Select Query is executed on Master Server First then logged binary file and then executed on Slave Server. So Logged file is small.
- Row Based.
Every change in Master Server row is logged and only that is effect executed on Slave. So Logged file is big.
Advantages of Database Replication
- Scale-Out Solutions
All the data writes and update of Master Server and Read can be distributed on slaves. So load can be distributed among the Servers.
- Data Security
Data is replicated to Slave Servers. Slave can stop replication. Run backup services without corrupting Master Server Database.