Transaction · Databases
38 questions · asked in 20 of 27 years (2000–2026)
MCQ 32 · MSQ 5 · NAT 11-mark 19 · 2-mark 19
2000Questions per year2026
Questions 16–20 of 38
Which one of the following is NOT a part of the ACID properties of database transactions?
Answer: (D)
The four ACID properties are Atomicity, Consistency, Isolation and Durability. Deadlock-freedom is not in this list.
Answer: Deadlock-freedom
Answer: Deadlock-freedom
Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1,... ,Ok}. This is done in the following manner:
Step 1. T acquires exclusive locks to O1,...,Ok in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.
This protocol will
Step 1. T acquires exclusive locks to O1,...,Ok in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.
This protocol will
Answer: (A)
T gets all its locks first. It does its operations only after that, and it frees the locks at the very end so the schedule follows two-phase locking and is serializable.
Every transaction asks for locks in increasing order of address. Because of this, no circular wait can occur so the protocol is deadlock-free.
Answer: guarantee serializability and deadlock-freedom
Every transaction asks for locks in increasing order of address. Because of this, no circular wait can occur so the protocol is deadlock-free.
Answer: guarantee serializability and deadlock-freedom
Suppose a database schedule S involves transactions T1,...,Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Answer: (A)
An edge tells us that has to run before the other transaction. If S is serializable, its precedence graph has no cycle. A topological order keeps every edge in the right direction, so it gives an equivalent serial schedule.
Answer: Topological order
Answer: Topological order
Consider the following databases chedule with two transactions, T1 and T2.
where denotes a read operation by transaction on avariable Z, denotes a write operation by on avariable Z and denotes an abort by transaction .
Which one of the following statements about the above schedule is TRUE?
where denotes a read operation by transaction on avariable Z, denotes a write operation by on avariable Z and denotes an abort by transaction .
Which one of the following statements about the above schedule is TRUE?
Answer: (C)
Neither transaction reads a value that the other one wrote before the other one ends. T1 reads X before T2 writes it. The reads of T2 come before the write of T1. So if T1 aborts, T2 need not be aborted: no cascading abort.
S is not strict, because overwrites while T1 is still active.
Answer: S does not have a cascading abort
S is not strict, because overwrites while T1 is still active.
Answer: S does not have a cascading abort
Consider the following transaction involving two bank accounts x and y.
read(x); x:=x-50; write(x); read(y); y:=y+50; write(y)
The constraint that the sum of the accounts x and y should remain constant is that of
read(x); x:=x-50; write(x); read(y); y:=y+50; write(y)
The constraint that the sum of the accounts x and y should remain constant is that of
Answer: (B)
The rule that x + y must stay the same is an integrity constraint on the database. A transaction has to keep this rule true. This is the consistency property.
Answer: Consistency
Answer: Consistency
Keep practising