Wait-die and Wound-wait Schemes 8

Wait-die scheme: It is a non-preemptive technique for deadlock prevention. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp smaller than that of Tj (That is Ti is older than Tj), otherwise Ti is rolled back (dies) For example: Suppose that transaction T22, T23, T24 have time-stamps 5, 10 and ...

Validation Based Protocol

It imposes less overhead Also based on Timestamp Protocol. It has three phases: Read Phase: During this phase, the system executes transaction Ti. . It reads the values of the various data items and stores them in variable local to Ti. It performs all the write operations on temporary local variables without update of the actual database. ...

Serializability

Serializability
Basic Assumption – Each transaction preserves database consistency Thus, serial execution of set of transactions preserves database consistency.   A (possibly concurrent) schedule is serializable if it os equivalent to serial schedule (say, Transaction T1 follows Transaction T2 or T2 follows T1)   Different form of schedule equivalence gives rise to the notions of  1. ...

Recoverable and Cascadeless Schedules 35

Recoverability A recoverable schedule is one where, for each pair of Transaction Ti and Tj such that Tj  reads data item previously written by Ti   the commit operation of Ti  appears before the commit operation Tj .     Suppose that the system allows T9 to commit immediately after execution of read(A) instruction.Thus T9 commit before T8 does. Now suppose that T8 fails ...

Normal Forms in Database

INF A relation is in first normal form if the domain of each attributes contains only atomic values and value of each attribute contains only a single value from that hand.   #Eliminate duplicative columns from the same table #Create separate table for each group of related data and identify each row with unique column(primary ...

Timestamp Based Protocol 1

Timestamps With each transaction Ti in the system, we associate a unique fixed timestamp, denoted by TS (Ti ). This timestamp is assigned by the database system before the Transaction Ti starts execution. If a transaction Ti has been assigned timestamp TS(Ti) and a new transaction Tj enters the system, then TS(Ti )

Tree Based Protocol 2

Tree Based Protocol
Only exclusive locks are allowed The first lock by Ti may be on any data item. Subsequently a data item Q can be locked by Ti only if the parent of Q is currently locked by Ti Data items may be unlocked at any time. A data item that has been locked and unlocked by ...

Graph Based Protocol

It impose partial ordering on the set D ={d1, d2, d3, …, dn} of all data items. If di -> dj , then any transaction accessing both di and dj must access di before accessing dj it implies that the set D may now be viewed as directed acyclic graph.

Lock Based Protocol 2

Lock Based Protocol
A lock is a mechanism to control concurrent access to a data item. Data items can be locked in two modes 1. Exclusive(X) mode: Data item can be both read as well as written. X-lock is requested using lock-x instruction. 2. Shared(S)-mode: Data item can only be read. S-lock is requested using lock-s instruction Lock ...

Concurrency Control

Concurrency control in Database management systems ensures that database transactions are performed concurrently without violating the data integrity of the respective databases. Thus concurrency control is an essential element for correctness in any system where two database transactions or more, executed with time overlap, can access the same data, e.g., virtually in any general-purpose database ...