Transaction Processing Thomas Leich, Gunter Saake University of Magdeburg Institute of Technical and Business Information Systems Last updated: 25.10.2020
Transaction Processing
Thomas Leich, Gunter Saake
University of MagdeburgInstitute of Technical and Business Information Systems
Last updated: 25.10.2020
Overview1 Motivation2 Transaction models3 Transaction management4 Advanced transaction models5 Recovery and back-up6 Distributed transactions7 Replication
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 0–2
Required basic knowledgeDatabases I:
Basic principles of database systemsTables, attributes, keysRelational algebra and SQL
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 0–3
OrganizationLecturer: Prof. Dr. Thomas LeichInformation (Timings, Room) & Slide copies can be found athttp://www.dbse.ovgu.de/Lehre/Lehrveranstaltungen/Transaction+Processing.htmlLecture: Tuesday weekly Room: OnlineExercise:
I Exercise conductor: Gabriel Campero DurandI Exercise (voluntary):
F Zoom and video, Monday 07:00–09:00 (Begins: see Website)
Examination:I Writen or oral exam (If less than 35 participants)I Requirement: Registration for exercise
For feedback and questions:I Mail to Gabriel Campero Durand
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 0–4
Underlying Textbook I
Saake, G.; Sattler, K.; Heuer, A.:Datenbanken:Implementierungstechniken.
Edition 3, mitp, 2011644 Pages, 39,95 eChapters 8, 9, 10
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 0–5
Underlying Textbook II
Rahm, E.; Saake, G.; Sattler, K.Verteiltes und ParallelesDatenmanagement.Von verteilen Datenbanken zuBig Data und Cloud
Edition 1, Springer, 2015379 PagesChapters 11–15Available as download!
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 0–6
LiteratureFor Database Implementation
Härder, T.; Rahm, E.: Datenbanksysteme — Konzepte undTechniken der Implementierung. Springer, 2001Garcia-Molina, H.; Ullman, J.; Widom, J.: Database SystemImplementation. Addison-Wesley, 1999.Silberschatz, A.; Korth, H. F.; Sudarshan, S.: Database SystemConcepts. Wiley & Sons, 2001.
For Transaction Processing:Sippu, S.; Soisalon-Soininen, E.: Transaction Processing —Management of the Logical Database and its Underlying PhysicalStructure. Springer, 2014Weikum, G.; Vossen, G.: Transactional Information Systems —Theory, Algorithms, and the Practice of Concurrency Control andRecovery . Morgan Kaufmann, 2001Gray, J.; Reuter, A.: Transaction Processing — Concepts andTechniques . Elsevier, 1992
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 0–7
Introduction
1. Introduction
1 Roles of Transactions
2 Transactions in the Architecture of a DBMS
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–1
Introduction
1. Introduction
1 Roles of Transactions
2 Transactions in the Architecture of a DBMS
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–1
Introduction Transactions in the Architecture of a DBMS
Background
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–2
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–3
Introduction Transactions in the Architecture of a DBMS
Tenth-floore test
Can I grab a random machine and throw it out the tenth-floor windowwithout adversely impacting users for more than 10 minutes? If theanswer to this was "yes", then we knew we were doing things right.
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–4
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–5
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–6
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–7
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–8
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–9
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–10
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–11
Introduction Transactions in the Architecture of a DBMS
Example
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–12
Introduction Transactions in the Architecture of a DBMS
Nine capabilities of a DBMS by Codd1 Integration2 Operations3 Catalog4 Views5 Consistency Control6 Data Protection7 Transactions8 Synchronization9 Recovery
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–13
Introduction Transactions in the Architecture of a DBMS
Transaction properties
A transaction is a sequence of operations (actions), which transfers adatabase from a consistent state into another eventually changedconsistent state, applying the ACID properties.
Aspects:I Semantic integrity: Correct (consistent) database state after the
end of transactionsI run-time integrity: Avoid errors caused by simultaneous access of
several users to the same data
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–14
Introduction Transactions in the Architecture of a DBMS
ACID PropertiesAtomicity:Transactions are either completed, or not performed at all.Consistency:If the database is in a consistent state before a transaction starts,the database is also consistent after the transaction has ended.Isolation:A user who is working on the database should not notice anyother user working on it.Durability:The result of a transaction must be permanently stored within thedatabase, after the transaction is completed.
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–15
Introduction Transactions in the Architecture of a DBMS
Architecture of DBMS
Interface (DI)Device
Interface (FI)File
Interface (SBI)System Buffer
Interface (IRI)Internal Record
Interface (ROI)Record−Oriented
Interface (SOI)Set−Oriented
Sorting, Concurrency ControlData Dictionary, Currency Pointer,
Page Replace StrategySystem Buffer Management with
Translation, Acces Path Selection,Access Control, Integrity Control
Record Manager, Access Path Management,Lock Management, Log/Recovery
External Storage Management
Access System
Storage System
Buffer Management
Operating System
Data System
Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–16