# Does “serializable” also mean that it's lockable

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}$$

• Hi @Chizx, and welcome to cs.stackexchange! Please don't use images as main content of your post. Not only is it lazy, it also makes your question impossible to search and inaccessible to the visually impaired; we don't like that. Please transcribe text and maths (note that you can use LaTeX) and don't forget to give proper attribution to your sources! – Wandering Logic May 3 '14 at 16:12
• Also, neither your current text or image define what it means for a schedule to be lockable. (It's not a term commonly applied to a schedule.) By finding the definitions of serializable, isolated and lockable in your book and writing them all down next to one another, this question should become clear enough to answer. – Wandering Logic May 3 '14 at 16:17

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

• The term lockable is just being used by me. What I mean is, can locks and unlocks be added into the schedule to make it serializable, and does serializable mean that locks need to be placed in appropriate locations. I understand the question better now .. The question is simply asking if any concurrency issues arise, such as fuzzy, phantom, or dirty reads --or even "lost updates". I do appreciate the help though.. locks are not needed for this problem, you have correctly defined serializable, but this was more or less a yes or no question.. thanks though – Chizx May 4 '14 at 2:12