Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "conflict serializable" and "conflict equivalent"?

In database theory, what is the difference between "conflict serializable" and "conflict equivalent"?

My textbook has a section on conflict serializable but glosses over conflict equivalence. These are probably both concepts I am familiar with, but I am not familiar with the terminology, so I am looking for an explanation.

like image 399
taz Avatar asked Dec 11 '12 15:12

taz


People also ask

What is conflict equivalent?

Two schedules are conflict equivalent if the relative order of any two conflicting operations is the same in both schedules.

What is the difference between serializable and conflict serializable?

Conflict serializability is a subset of serializability. If a schedule is conflict serializable, it is implied that this schedules is serializable. It is computationally easier to determine if something is conflict serializable as opposed to just serializable. Simply construct a precedence graph.

What is conflict equivalent serializability in DBMS?

Conflict Serializable: A schedule is called conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting operations. Conflicting operations: Two operations are said to be conflicting if all conditions satisfy: They belong to different transactions. They operate on the same data item.

What is meant by conflict serializable?

Conflict serializability orders any conflicting operations in the same way as some serial execution. A pair of operations is said to conflict if they operate on the same data item and one of them is a write operation. That means.


1 Answers

Conflict in DBMS can be defined as two or more different transactions accessing the same variable and atleast one of them is a write operation.

For example:

T1: Read(X)    T2: Read (X) 

In this case there's no conflict because both transactions are performing just read operations.

But in the following case:

T1: Read(X)    T2: Write(X) 

there's a conflict.

Lets say we have a schedule S, and we can reorder the instructions in them. and create 2 more schedules S1 and S2.

Conflict equivalent: Refers to the schedules S1 and S2 where they maintain the ordering of the conflicting instructions in both of the schedules. For example, if T1 has to read X before T2 writes X in S1, then it should be the same in S2 also. (Ordering should be maintained only for the conflicting operations).

Conflict Serializability: S is said to be conflict serializable if it is conflict equivalent to a serial schedule (i.e., where the transactions are executed one after the other).

like image 116
letsBeePolite Avatar answered Sep 30 '22 06:09

letsBeePolite