# Recent questions tagged transactions

1
Can someone please explain the steps to check view serializability using polygraph method ? I am really having trouble in understanding it.
2
What is the equivalent serial schedule for the following transactions? $T_1 - T_2 - T_3$ $T_3 - T_1 - T_2$ $T_2 - T_1 - T_3$ $T_1 - T_3 - T_2$
3
Which of the following is correct with respect to Two phase commit protocol? Ensures serializability Prevents Deadlock Detects Deadlock Recover from Deadlock
1 vote
4
Read(Q) Write(Q) Write(Q) Is this schedule View serializable???? in <T1,T2> it violates the final Write criteria in <T2,T1> does it violate initial Read criteria?
5
Which of the following is the highest isolation level in transaction management? Serializable Repeated Read Committed Read Uncommitted Read
6
Consider the following two phase locking protocol. Suppose a transaction $T$ accesses (for read or write operations), a certain set of objects $\{O_1,\ldots,O_k \}$ ... and deadlock-freedom guarantee neither serializability nor deadlock-freedom guarantee serializability but not deadlock-freedom guarantee deadlock-freedom but not serializability.
7
Which one of the following is NOT a part of the ACID properties of database transactions? Atomicity Consistency Isolation Deadlock-freedom
8
Consider the following database schedule with two transactions $T_{1}$ and $T_{2}$. $S= r_{2}\left(X\right); r_{1}\left(X\right); r_{2} \left(Y\right); w_{1} \left(X\right); r_{1} \left(Y\right); w_{2} \left(X\right); a_{1}; a_{2}$ ... the above schedule is TRUE? $S$ is non-recoverable. $S$ is recoverable, but has a cascading abort. $S$ does not have a cascading abort. $S$ is strict.
9
Suppose a database schedule $S$ involves transactions $T_1,........,T_n$ . 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 ... is guaranteed to yield a serial schedule? Topological order Depth-first order Breadth- first order Ascending order of the transaction indices
10
S: T1(A)R2(B)W2(B)R2(A)W2(B)W1(A)R3(B)W3(B) Given schedule is view serializable ?
11
schedule R(A) R(B) R(B) W(A) COMMIT R(C) R(B) W(C) W(B) R(A) R(C) COMMIT COMMIT The above scedule is -: a)conflict serializable b)recoverable c)cascadeless d)all of these according to me a)&b) answer given -:a)
1 vote
12
Consider the following two transactions. T1: R(A) W(A) R(B) W(B) T2: R(A) W(A) R(B) W(B) How many interleavings of these transactions are conflict serializable?
1 vote
13
I want to confirm my answers.. For 19.2.1 a) VIEW equal serial order T1 T2T3 or T2T1T3 b) VIEW equal serial order 6 possible orders c) 2 VIEW equal serial orders d) 2 VIEW equal serial orders For 19.2.2 A) 2 VIEW equal serial orders and one conflict equal one b) 1 VIEW equal serial orders and 1 conflict equal.. { all schedules have 1 conflict equal serial order} Plz point out my mistakes.
14
15
how many view equivalent serial schedules are possible for the given schedule s: w1(a) r2(a) w3(a) r4(a) w5(a) r6(a) a) 2 b) 3 c) 6 d) 8
16
Is it Conservative 2 Phase locking (C2PL) ? T1 LOCK-X (A) LOCK-S (B) R(A) R(B) W(A) UNLOCK (A) COMMIT UNLOCK (B)
17
18
Consider the following Two Transactions. How many Cascadeless schedules are possible over $T1$ & $T2$ ? $32$ $42$ $51$ $52$
19
Consider the following Two Transactions. A) How many recoverable schedules can be formed over $T_{1}$ & $T_{2}$ ? $51$ $52$ $55$ $56$ B) How many cascadeless recoverable schedules can be formed over $T_{1}$ & $T_{2}$ ? $41$ $42$ $45$ $50$
20
t1 t2 w(x) r(x) w(x) commit commit Why is this not view serializable?
21
The transactions $T1$ and $T2$ are given as follows: $T1$: $R1(A)$ $W1(A)$ $R1(B)$ $W1(B)$ $T2$ : $R2(B)$ $W2(B)$ $R2(C)$ $W2(C)$ The total number of conflicts serializable that can be formed by $T1$ and $T2$ are Answer :20 (incorrect) The correct answer is 14
1 vote
22
23
$\begin{bmatrix} T1 &T2 \\ R(A) & \\ W(A)& \\ & R(A)\\ & W(A)\\ &R(B) \\ &W(B) \\ & Commit\\ Abort& \end{bmatrix}$ How is this schedule allowed in 2PL ? In 2PL , there must be a growing phase in , which is not present in T2 ..? This example is given in the book by Raghu Ramkrishnan on page 529 and 552 (for reference)
24
According to 2-phase locking protocol, if a transaction acquires an exclusive lock on any object, another transaction cannot obtain any kind of lock on it till the first transaction unlocks it. Is the reverse also true, i.,e., if a transaction acquires a shared ... interleaving transaction cannot acquire any kind of lock on it..? or it cannot acquire exclusive lock, but can acquire shared lock. ?
25
Suppose we have a schedule containing two transactions  as shown- $\begin{bmatrix} T1 & T2 \\ R(A) & \\ W(A) & \\ & R(A) \\ & W(A) \\ R(B)& \\ W(B)& \\ & R(B) \\ & W(B) \end{bmatrix}$   We will proceed to create the polygraph for the ... schedule. If we create separate polygraphs, for A we will get t1->t2, and for B we will get t1->t2.. Same graph will be obtained if we draw a single polygraph
26
I am unable to differentiate between a strict schedule and a cascadeless schedule...although what I have understood is that in strict schedule, we cannot perform read/write till the other transaction commits..but isnt this condition also valid for cascadeless schedules ? Can someone please explain by giving an example.
27
Consider the partial Schedule $S$ involving two transactions $T1$ and $T2$. Only the $\textit{read}$ and the $\textit{write}$ operations have been shown. The $\textit{read}$ operation on data item $P$ is denoted by $\textit{read(P)}$ and ... aborted and then re-started to ensure transaction atomicity Schedule $S$ is recoverable and can ensure transaction atomicity and nothing else needs to be done
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 Atomicity Consistency Isolation Durability
Consider $3$ transactions $T_1, T_2$ and $T_3$ having $2, 3$ and $4$ operations respectively. Find the number of concurrent schedules?