Mirroring refers to keeping a backup database server for a master database server. If for some reason, master database is down then mirror database can be used as an alternative for master database. In principle, only one database server is active at one time and request for database is served from one server only which is active.
Replication refers to keeping the multiple copies of databases spread across multiple geographic locations. Classic example of replication is file servers which are replicated across continents so that the user can download the file from the nearest location to avoid network delays and any slow response.
Following are the important differences between Mirroring and Replication.
|1||Definition||Mirroring refers to keeping copies of database to a geographically different location.||Replication referes to creating multiple copies of data objects of a database for distribution efficiency.|
|2||Target||Mirroring is applicable on complete database as a whole.||Replication is done on database objects.|
|3||Cost||Mirroring is costlier than replication.||Replication is cheaper as compared to Mirroring.|
|4||Distributed Databases||Mirroring is not applicable in case of Distributed databases.||Replication can be easily implemented in case of distributed databases.|
|5||Location||Mirroring is done to create a copy of database on different hardware and on different location to serve as backup location.||Replication is done to create a copy of database objects and can be copied to a different database as well.|