# Conflict serializibility

So, the task is to prove the following:

If S is a schedule containing at most one write action, then S is conflict-serializable.

The answer is yes, but I disagree, because the following schedule contains at most one write action, and is not conflict-serializable:

R1(A), R2(A), W2(A), R1(A).

Am I completely wrong? Or is the answer wrong?

• The statement is true if in a transaction there is only one read on a datum (no repeated reads). And this a reasonable assumption when discussing schedules (and also in practice). – Renzo Jan 21 '18 at 9:49
• But let´s say repeated reads are allowed. If we just look at this in theory and not practical, does the assumption hold? – newbie Jan 21 '18 at 9:59
• In this case I think the assumption does not hold. – Renzo Jan 21 '18 at 10:09
• So the given schedule is not allowed basically? – newbie Jan 21 '18 at 10:17
• I think the statement to prove should be interpreted in this way (no duplicate operations on data). However, I looked in several well-known books on databases and didn't find an explicit prohibition of replication of operations on the same data in the definition of a schedule. So, it is not clear to me if this is just a case of underspecification or something else. – Renzo Jan 21 '18 at 10:50

The resulting precedence graph for your example will contain a cycle due to $R1(A) W2(A) R1(A)$. Hence its not conflict serializable. Since one example is sufficient to disprove the statement, therefore I agree with you. The answer might be wrong.
• @Renzo Not allowing duplicate reads combined with the condition of having at most one write operation essentially leaves us with the choice of operations like $R1(A) W2(A)$ or $R2(A) W1(A)$. This becomes too simple to be seen as serializable. Whats's to prove here then? or have I misunderstood something? – virmis_007 Jan 21 '18 at 13:18