Summary by Ketan R. Shah

Data Replication

Advantages :

Multiple Copies required for Critical Data.
Access time reduced if the site is physically close or replicated data is local.

Complication :

System not only to guarantee that each copy is self consisten ( Internal Consistency ), but also that all copies of a data object has the same value ( Mutual consistency )

Distributed DBMS

Transaction Manager (TM) :

Supervises execution of a Transaction.
It acts as interface between users and the database system.
It interacts with appropriate DMs..

Data Manager (DM) :

Data Manager acts as interface between the network and database.
It manages the database stored at that site.
It executes a stream of actions, directed towards it by many TMS.

A database is said to be CONSISTENT if the values of its data objects satisfy all of its consistency assertions or integrity constraints.

The actions of a user are normally grouped together ( as a program ) to form a single logical unit of interaction, termed a Transaction.

Assumptions of a Transaction.

A transaction preserves the consistency of a database.
A transaction terminates in finite time.

The Problem of Concurrency Control

In a database system several transactions occur simultaneously.

To guarantee consistence, transactions can be executed serially.

Such serial execution results in poor response to user requests and poor utilization of system resources.

Efficiency can be increased by Concurrent execution.

But concurrently running transactions may access the same data objects and hence several anamalous situations may arise if not controlled in some orderly way.

Serializability Theory gives precise rules and conditions underwhich a concurrent execution of a set of transactions is correct. This determines whether to commit or abort.

It models execution of a concurrency control algorithm by a history variable called the LOG. A log captures the chronological order in which read and write actions of transactions are executed.

If transactions are executed strictly serially, resulting log is termed serial log.

Two logs in a system are equivalent if,

1. Every read operation reads from the same write operation in both the logs and,

2. Both the logs have the same final writes.

A log obtained by interleaving actions of transactions T1,T2,.Tn, is serializable if it has the same effect on the database as the serial execution of a permutation of T1,T2..Tn.

Serialization:

Consider two concurrent transactions and executed at only one DM :

Log : R1(x) R2(y) R1(y) W1(z) W1(x) W2(x) R2(z)

Serial Order 1:

R2(y) W2(x) R2(z) R1(x) R1(y) W1(z) W1(x)

Serial Order 2:

R1(x) R1(y) W1(z) W1(x) R2(y) W2(x) R2(z)

We find that execution of Log is not similar to Serial Order 1 but it is similar to Serial Order 2. This is because R2(z) reads from W1(z) in Original log but in Order 1 we have R2(z) reads the initial value which is updated later by W1(z). Also W2(x) is the last write on x in Original log but in Order 1 we have W1(x) overwrites the value written by W2(x) and hence it is the last write. But Serial Order 2 gives the same result as Original Log and hence our Log is consistent and can be committed. Hence our Log is SERIALIZABLE.

Ketan Shah