Why Use Database Replication?

Database replication is the process of copying a database so that two or more copies can exchange updates of data or replicated objects. This exchange is called synchronization. Each copy of the database is called a replica, and each contains a common set of tables, queries, forms, reports, macros, and modules. Each replica can also contain local objects that exist only in that specific replica.

Each replica is part of a replica set, which contains the Design Master and the other replicas for a database. The Design Master is the only replica where you can make changes to the database’s design and objects. Replicas that belong to the same replica set can synchronize with one another.

With database replication, you can:

Although database replication can solve many of the problems inherent in distributed database processing, it is important to recognize the situations in which replication is less than ideal. You may not want to use replication if:

The new approach and flexibility that database replication offers can be illustrated by the development of a simple application. Imagine that a client has asked you to develop a contact management application for the company’s field sales staff to use to monitor sales and orders. Each sales representative has a laptop computer that can be connected to the company’s network.

One approach to building this application is to separate the tables from the other objects in the database. The data resides in tables in a back-end database on a network server while the queries, forms, reports, macros, and modules reside in a front-end database on each sales representative’s computer. When sales representatives want to retrieve or update data, they open and use the front-end database. Because the objects in the front-end database are based on linked tables, changes that sales representatives make to the data using these objects change the data in the back-end database.

See Also   For more information on this approach, see “Separating Your Application’s Tables from Its Other Objects” in Chapter 15, “Delivering Your Application.”

A better way to build this application is to use database replication to create a single database that contains both the data and objects, and then make replicas of the database for each sales representative.

You begin developing the application by creating a Microsoft Access database as you would for any application. Then you convert that database to a Design Master and make replicas on each user’s computer. Sales representatives update data in the replicas on their computers during the course of a work session, while you synchronize their replicas with the Design Master replica on the server as needed. You can also create a set of custom forms or reports that are used at only one replica location. The following sections discuss the tools you can use to implement each of these features.