Serializable schedules are schedules that always leaves the entire database in a consistent state after all successful transactions. When multiple transactions are executed in the database, the data may or may not become inconsistent. In serializability, A serial schedule always ensures serializability because, in a serial schedule, another transaction will proceed only when the previous transaction has finished/executed.No conflicts arise in a serial schedule.
Types of Serializability and Serializable schedules
- Conflict Serializability
- View Serializability
Conflict Serializability vs View Serializability
|Conflict Serializability||View Serializability|
|1. If a schedule can be transformed into a serial schedule by performing non-conflicting operations, then it is said to have conflict serializability.||1. If a schedule is view equal to a serial schedule i.e. no conflicting transactions, then it is said to have view serializability.|
|2. To check Conflict Serializability, check if actions are conflicting or not. Actions are said to be conflicting when in different transactions, write operations are involved and transaction values of the same object are changed.||2. To check for view serializablity, we need to first check if schedule is view equivalent to serial schedule.|
|3. Every conflict serializable is view serializable.||3. But, reverse is not true.|
|4. The test for Conflict Serializability easy. For testing purposes, Precedence Graph is used. If there is any cycle in the graph then the schedules are said to be non-serializable else serializable schedule.||4. The test for View Serializablity is expensive.A polygraph is used to check if the schedule is view-serializable or not.|
|5. Conflict Serializability is easy to achieve.||5. View Serializablity is a NP-Hard Problem and hence, hard to achieve.|
|6. Conflict serializability is a subset of view serializability.||6. View serializability is a superset of conflict serializability.|
|7. In most of concurrency control schemes, conflict serializability is used.||7. View Serializablity is rarely used.|
Serializability is a concept that helps us to check which schedules are serializable. A serializable schedule is the one that always leaves the database in consistent state.
A serializable schedule is a schedule whose effect on any consistent database instance is guaranteed to be identical to that of some complete serial schedule over S.
Two types of serializabilties are: Conflict Serializability and View Serializability.