What is Serializability ?
Serializability is the concurrency scheme.
Serializability 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.
Let’s take a simple example:
UPDATE EMPLOYEE SET SALARY=SALARY+10000 WHERE EMPNO=1010;
In this SQL query, two transactions are running concurrently updation of salary and searching of employee no.
Conflict serializability
Instructions I1 and I2 of transactions T1 and T2 respectively, conflict if and only if there exists some item A accessed by both I1 and I2, and at least one of these instructions write A.
- I1 = Read(A), I2 = Read(A). I1 and I2 don’t conflict.
- I1 = Read(A), I2 = Write(A). They conflict.
- I1 = Read(A), I2 = Write(A). They conflict
- I1 = Read(A), I2 = Write(A). They conflict