Write a note on conflict serializability

Question: Write a note on conflict serializability.


What is conflict Serializability?
   Conflict Serializability in DBMS. Conflict Serializable: A schedule is called conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting operations. Conflicting operations: Two operations are said to be conflicting if all conditions satisfy: They belong to different transactions.

What is Serializability explain?
   Serializability is the classical concurrency scheme. It ensures that a schedule for executing concurrent transactions is equivalent to one that executes the transactions serially in some order. It assumes that all accesses to the database are done using read and write operations.

What is conflict in DBMS?
   Conflict in DBMS can be defined as two or more different transactions accessing the same variable and atleast one of them is a write operation. ... Conflict equivalent: Refers to the schedules S1 and S2 where they maintain the ordering of the conflicting instructions in both of the schedules

Conflicting operations
   Two operations are said to be in conflict, if they satisfy all the following three conditions:
  1. Both the operations should belong to different transactions.
  2. Both the operations are working on same data item.
  3. At least one of the operation is a write operation.

Example-1: Operation W(X) of transaction T1 and operation R(X) of transaction T2 are conflicting operations, because they satisfy all the three conditions mentioned above. They belong to different transactions, they are working on same data item X, one of the operation in write operation.


Example-2: Similarly Operations W(X) of T1 and W(X) of T2 are conflicting operations.

Example-3: Operations W(X) of T1 and W(Y) of T2 are non-conflicting operations because both the write operations are not working on same data item so these operations don’t satisfy the second condition.

Example-4: Similarly R(X) of T1 and R(X) of T2 are non-conflicting operations because none of them is write operation.

Example-5: Similarly W(X) of T1 and R(X) of T1 are non-conflicting operations because both the operations belong to same transaction T1.

Conflict Equivalent Schedules
   Two schedules are said to be conflict Equivalent if one schedule can be converted into other schedule after swapping non-conflicting operations.

Conflict Serializable check
   Lets check whether a schedule is conflict serializable or not. If a schedule is conflict Equivalent to its serial schedule then it is called Conflict Serializable schedule. Lets take few examples of schedules.

Example of Conflict Serializability
 Lets consider this schedule:
T1         T2
-----     ------
R(A)
R(B)
          R(A)
          R(B)
          W(B)
W(A)
   To convert this schedule into a serial schedule we must have to swap the R(A) operation of transaction T2 with the W(A) operation of transaction T1. However we cannot swap these two operations because they are conflicting operations, thus we can say that this given schedule is not Conflict Serializable.

Lets take another example:
T1         T2
-----     ------
R(A)
          R(A)
          R(B)
          W(B)
R(B)
W(A)
Lets swap non-conflicting operations:

After swapping R(A) of T1 and R(A) of T2 we get:
T1         T2
-----     ------
          R(A)
R(A)
          R(B)
          W(B)
R(B)
W(A)

After swapping R(A) of T1 and R(B) of T2 we get:
T1         T2
-----     ------
          R(A)
          R(B)
R(A)
          W(B)
R(B)
W(A)

After swapping R(A) of T1 and W(B) of T2 we get:
T1         T2
-----     ------
          R(A)
          R(B)
          W(B)
R(A)       
R(B)
W(A)

Write a note on conflict serializability in dbms

Download the Android app to get all Government Job Notifications on your Mobile.
Download Now
Important: Please always Check and Confirm the above details with the official Advertisement / Notification.
Previous Post Next Post