Chapter 6
Chapter 6
Chapter 6
Data Replication
Data replication is the process of storing separate copies
of the database at two or more sites. It is a popular fault
tolerance technique of distributed databases.
A relation or fragment of a relation is replicated if it is
stored redundantly in two or more sites.
Full replication of a relation is the case where the
relation is stored at all sites.
Fully redundant databases are those in which every site
contains a copy of the entire database.
Prepared by Elisaye B. @WSU-DTC 4
Advantages of Data Replication
Reliability − In case of failure of any site, the database
system continues to work since a copy is available at
another site(s).
Reduction in Network Load − Since local copies of data
are available, query processing can be done with reduced
network usage, particularly during prime hours. Data
updating can be done at non-prime hours.
Quicker Response − Availability of local copies of data
ensures quick query processing and consequently quick
response time.
Simpler Transactions − Transactions require less number
of joins of tables located at different sites and minimal
coordination across the network. Thus, they become
Prepared by Elisaye B. @WSU-DTC 5
simpler in nature.
Disadvantages of Data Replication
Increased Storage Requirements − Maintaining multiple copies
of data is associated with increased storage costs. The storage
space required is in multiples of the storage required for a
centralized system.
Increased Cost and Complexity of Data Updating − Each time a
data item is updated, the update needs to be reflected in all the
copies of the data at the different sites. This requires complex
synchronization techniques and protocols.
Undesirable Application – Database coupling − If complex
update mechanisms are not used, removing data inconsistency
requires complex co-ordination at application level. This results in
undesirable application – database coupling.
Some commonly used replication techniques are −
Snapshot replication
Near-real-time replication
Prepared by Elisaye B. @WSU-DTC 6
Fragmentation
Fragmentation is the task of dividing a table into a set of
smaller tables.
The subsets of the table are called fragments.
Fragmentation can be of three types: horizontal, vertical,
and hybrid (combination of horizontal and vertical).
Horizontal fragmentation can further be classified into
two techniques: primary horizontal fragmentation and
derived horizontal fragmentation.
Fragmentation should be done in a way so that the original
table can be reconstructed from the fragments.
This is needed so that the original table can be
reconstructed from the fragments whenever required.
This requirement is called “Re-constructiveness.”
Prepared by Elisaye B. @WSU-DTC 7
Vertical Fragmentation
In vertical fragmentation, the fields or columns of a
table are grouped into fragments.
In order to maintain re-constructiveness, each
fragment should contain the primary key field(s) of
the table. Vertical fragmentation can be used to
enforce privacy of data.
branch_name customer_name