Serializability in DBMS
- Serializability is a given set of interleaved transactions is said to be serial sable if and only if it produces the same results as the serial execution of the same transactions Serializability is an important concept associated with locking.
- It guarantees that the work of concurrently executing transactions will leave the database state as it would have been if these transactions had executed serially.
- This requirement is the ultimate criterion for database consistency and is the motivation for the two-phase locking protocol, which dictates that no new locks can be acquired on behalf of a transaction after the DBMS releases a lock held by that transaction.
- In practice, this protocol generally means that locks are held until commit time.
- 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. A schedule is called ``correct'' if we can find a serial schedule that is ``equivalent'' to it.
- Given a set of transactions T1...Tn, two schedules S1 and S2 of these transactions are equivalent if the following conditions are satisfied:
- Read-Write Synchronization: If a transaction reads a value written by another transaction in one schedule, then it also does so in the other schedule
- Write-Write Synchronization: If a transaction overwrites the value of another transaction in one schedule, it also does so in the other schedule.