Please enable JavaScript.
Coggle requires JavaScript to display documents.
Transaction: Concurrency - Coggle Diagram
Transaction: Concurrency
Schedule
-
Schedule: Interleaving actions from a set of TXNs,
where actions of any TXN are in original order
-
Equivalent schedule: for every database state, two schedules have the same effect
-
Conflict: two actions from different TXNs, involve same variable, >=1 is write
-
RW: unrepeatable read
TXN reads data twice, but in between data modified by other TXN, so read differently => breaks isolation
-
-
-
Anomalies: isolation/consistenct broken due to bad schedule, defined by conflicts
-
Conflict Serializability
conflict equivalent: involve same actions of same TXNs; every pair of conflicting actions of two TXNs are ordered in the same way
-
conflict serializable => serializable => consistent & isolation (need to check every possible serial schedule)
-
Locking
-
lock manager
<TXN ID, Record ID, Mode>
mode: Shared = read (S), Exclusive = wrote (X)
if TXN cannot get a lock, has to wait
-
Performance
Penalty: clocked actions, aborted transactions
-
-
-