Serial Schedule vs Non-Serial Schedule in Database Transactions
When multiple transactions are executing concurrently, then the order of execution of operations from the various transactions is known as schedule.
- Serial Schedule
- Non-Serial Schedule
Transactions are executed one by one with out any interleaved operations from other transactions.
A schedule where the operations from a set of concurrent transactions are interleaved.
What is Serializability?
A given non serial schedule of n transactions are serializable if it is equivalent to some serial schedule.That is this non serial schedule produce the same result as of the serial schedule. Then the given non serial schedule is said to be serializable.A schedule that is not serializable is called a non-serializable.
Non-Serial Schedule Classification
- Not Serializable
- Non Recoverable
Serializable Schedule Classification
- Conflict Serializable
- View Serializable
Conflict Serializable Schedule
If a schedule S can be transformed into a schedule S’ by a series of swaps of non conflicting instruction then we say that S and S’ are conflict equivalent.A schedule S is called conflict serializable if it is conflict equivalent to a serial schedule.
View Serializable Schedule
All conflict serializable schedule are view serializable.But there are view serializable schedule that are not conflict serializable.A schedule S is a view serializable if it is view equivalent to a serial schedule.
Recoverable Schedule Classification
To recover form the failure of a transaction Ti, we may have to rollback several transactions. This phenomenon in which a single transaction failure leads to a series of transaction roll back is called cascading roll back.Avoid cascading roll back by not allowing to read uncommitted data. But this lead to a serial schedule.
A file is organized as a sequence of records. The following are the various ways of organizing records in file
- Heap File Organization
- Sequential File Organization
- Hashing File Organization.
Heap File Organization
Any record can be placed any where in the file where there is space for record.There is no ordering of record.Generally there is a single file for each relation (table)
Sequential File Organization
Records are stored in sequential order, according to the value of a “search key” of each record.
Hashing File Organization
A hash function is computed on some attribute of each record. It specifies the location of the record to be placed.