What is a transaction ?
An action, or series of actions, carried out by a single user or application program, which reads or updates the contents of the database.
What is a logical unit of work ?
It’s a transaction. That transforms the database from one consistent state to another.
What other units are transactions?
Unit of :
- Concurrency
- Recovery
- Work
What are the 4 ACID properties?
How are transactions reliable and consistent, and to what mechanisms do they relate to ?
The are due to the “ACIDity” properties of transactions.
They relate to the concurrency control and recovery mechanisms:
What are the 3 types of schedules ?
When/how is a schedule conflict serialisable ?
If it is (conflict) equivalent to some serial schedule.
Any conflicting operations are ordered in the same way as some serial schedule.
Give the type of schedule:
Sa: read(T1, X); read(T2, X); write(T1, X); write(T2, X); commit(T1); commit(T2);
T1 T2
Give the type of schedule:
Sb: read(T1, X); read(T2, Y); read(T3, X); write(T3, X); read(T2, X); read(T1, Y); abort(T3); commit(T1); commit(T2);
Give the type of schedule:
Sc: read(T1, X); read(T2, X); write(T1, X); read(T1, Y); write(T2, X); commit(T2); write(T1, X); commit(T1);