Top Banner
Transaction Processing Thomas Leich, Gunter Saake University of Magdeburg Institute of Technical and Business Information Systems Last updated: 25.10.2020
25

Transaction Processing - OVGU

Jan 31, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Transaction Processing - OVGU

Transaction Processing

Thomas Leich, Gunter Saake

University of MagdeburgInstitute of Technical and Business Information Systems

Last updated: 25.10.2020

Page 2: Transaction Processing - OVGU

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

Page 3: Transaction Processing - OVGU

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

Page 4: Transaction Processing - OVGU

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

Page 5: Transaction Processing - OVGU

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

Page 6: Transaction Processing - OVGU

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

Page 7: Transaction Processing - OVGU

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

Page 8: Transaction Processing - OVGU

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

Page 9: Transaction Processing - OVGU

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

Page 10: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Background

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–2

Page 11: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–3

Page 12: Transaction Processing - OVGU

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

Page 13: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–5

Page 14: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–6

Page 15: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–7

Page 16: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–8

Page 17: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–9

Page 18: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–10

Page 19: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–11

Page 20: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Example

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–12

Page 21: Transaction Processing - OVGU

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

Page 22: Transaction Processing - OVGU

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

Page 23: Transaction Processing - OVGU

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

Page 24: Transaction Processing - OVGU

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

Page 25: Transaction Processing - OVGU

Introduction Transactions in the Architecture of a DBMS

Storage hierarchy

Magnetic Tapes

Optical Disk

Disk Memory

Main Memory

Tertiary Storage

Secondary Storage

Primary StorageCache

Thomas Leich, Gunter Saake Transaction Processing Last updated: 25.10.2020 1–17