Get the App
SLTechnology News&Howtos  ›  Database  › 

What's the difference between database mirroring and replication?

Shulou Source: shulou.com Published: 2022-06-01 01:51:38 10月04日 Update

This article mainly introduces the difference between database mirroring and replication, the article is very detailed, has a certain reference value, interested friends must read it!

What is database mirroring?

Database mirroring is a technique for creating and maintaining redundant copies of a database, which are always synchronized with the principal database; these database copies are usually located on different machines. This technology helps ensure uninterrupted data availability and reduces downtime due to data corruption or loss.

It can create copies of the database in two different server instances (principal and mirror). These mirrored replicas work as alternate copies and are not always active like data replication.

In the event of any failure, it can recover data by copying data from one database to another. In the event of any failover, the mirror database becomes the primary database.

What is database replication?

Database replication is the technique of copying data and distributing these copies from one database to another.

In replication, data and database objects are replicated and distributed from one database to another. It reduces the load on the original database server because the client can use multiple servers; and all servers that replicate the database are as active as the primary server. To maintain consistency between data and database objects, the database is also synchronized.

This technique can be used to replicate data in multiple databases. Partial replication is implemented only for a subset of a table or a column of a row, so it basically cannot replicate the entire database.

Key differences between replication and mirroring:

1. A mirror database can usually be found on a different machine from its master database. Instead, the replicated data and database objects are stored in another database.

2. Mirroring does not support distributed environment, but replication is designed for distributed database.

3. The cost of database mirroring is higher than replication.

Replication and mirroring technologies can also be combined to achieve higher database availability.

These are all the contents of the article "what's the difference between database mirroring and replication". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Data database mirror replica technology server service different object subject content distributed multiple machine article original consistent consistent between Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Apple Huawei macOS Microsoft