Cheap and Secure Web Hosting Provider : See Now

# [Solved]: Does "serializable" also mean that it's lockable

, ,
Problem Detail:

Here's an final exam question for a Database Fundamentals class. I've read the book, stuff online.. I can't figure out if "serializable" also means that the schedule is lockable or not. What I mean is.. I understand that for the schedule to be isolated, you have to have non-conflicting reads & writes, but then it also says "if the transactions are not isolated(i.e., serializable).."

By determining if the schedule is isolated, does this include determining if locks(lock-W(x), lock-R(x)) and unlocks can be placed inside the schedule, is "serializable" both isolated and lockable?

lockable - can locks and unlocks be placed inside the schedule at appropriate R/W-intervals.

Here's the question:

a). Two transactions are shown below. The statements of the transaction are executed from top to bottom. Specify whether the current schedule meets the Isolated property of ACID and why or why not. If the transactions are not isolated (i.e., serializable) specify what concurrency problem may occur with this schedule. Be specific about what statement(s) in what transaction(s) causes the issue.

$$\begin{array}{}Time&Transaction \, 1&Transaction \, 2 \\1&Read(B)&Read(B) \\2&\_&Update(C = C + B) \\3&Read(C)&\_ \\4&\_&COMMIT \, or \, ROLLBACK \\5&Update(A=B+C)&\_ \\6&COMMIT\, or \, ROLLBACK&\_\end{array}$$

#### Answered By : Grisha Weintraub

The definition of serializable schedule is pretty clear. Intuitively, it is a schedule which is equivalent to a serial schedule.

More formally, according to [1] :

A serializable schedule over a set S of transactions is a schedule whose effect on any consistent database instance is guaranteed to be identical to that of some complete serial schedule over the set of committed transactions in S.

In your example the schedule is definitely serializable, since it is equivalent to running Transaction 2 and then Transaction 1.

I don't know what do you mean by "lockable" and not sure that this term can be applied to a schedule.

[1] R.Ramakrishnan and J.Gehrke, Database Management Systems, 3rd edition