What is the difference between “conflict serializable” and “conflict equivalent”?

前端 未结 8 1805
猫巷女王i
猫巷女王i 2021-02-02 10:00

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

My textbook has a section on conflict serializable but glosses

8条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-02 10:05

    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).

提交回复
热议问题