Contents

CS186-L13: Transactions & Concurrency I

/databasel13/image.png 🎉

Intro

transaction’s principle ACID /databasel13/image-1.png

Isolation (Concurrency)

/databasel13/image-2.png however, do not consider serial execution 😅

Atomicity and Durability

/databasel13/image-3.png

Consistency

/databasel13/image-4.png

Concurrency Control

基本符号表达 /databasel13/image-5.png

序列等价性:

  • $Def1:$ Serial Schedule
    • each transaction executes in a serial order, one after the other, without any intervening
  • $Def2:$ schedules Equivalent
    • involve same transaction
    • each transaction’s actions are the same order
    • both transactions have the same effect on the database’s final state
  • $Def3:$ Serializable
    • if a schedule is serializable, then it is equivalent to some serial schedule

Conflict Serializability

conflict operations?

/databasel13/image-6.png /databasel13/image-7.png Intuitive Understanding of Conflict Serializable /databasel13/image-8.png

Conflict Dependency Graph /databasel13/image-9.png

View Serializability

/databasel13/image-10.png

Conclusion

Neither definition allows all schedules that are actually serializable.

because they can not check the meaning of the operation 😈