SlideShare a Scribd company logo
RELATIONAL DATABASE MANAGEMENT SYSTEM
TRANSACTION MANAGEMENT
By,
S.Subhalakshmi,
M.Sc(cs).
Nadar saraswathi college of arts and science.
TRANSACTION MANAGEMENT:
 A Transaction is a very small unit of a program and it
may contain several low level tasks.
 A Transaction in a database system must maintain
Atomicity, Consistency, Isolation, and Durability − commonly
known as ACID properties.
 In order to ensure accuracy, completeness, and data
integrity.
FAILURE CLASSIFICATION:
 The simplest type of failure is one that does not result
in the loss of information in the system.
 There are various types of failure that may occur in a
system.
 The failures that are more difficult to deal with are
those that result in loss of information.
 The following types of failures are:
TRANSACTION FAILURE:
 There are two types of errors that may cause a transaction to
fail:
 LOGICAL ERROR :transaction cannot complete due to
some internal error condition.
 SYSTEM ERROR: the database system must terminate an
active transaction due to an error condition (e.g., deadlock).
 SYSTEM CRASH: a power failure or other hardware or
software failure causes the system to crash.
 FAIL-STOPASSUMPTION: non-volatile storage contents
are assumed to not be corrupted by system crash.
 DISK FAILURE: a head crash or similar disk failure destroys
all or part of disk storage.
 DESTRUCTION IS ASSUMED TO BE
DETECTABLE: disk drives use checksums to detect failures.
RECOVERY WITH CONCURRENT
TRANSACTIONS :
 We modify the log-based recovery schemes to allow
multiple transactions to execute concurrently.
 All transactions share a single disk buffer and a single
log.
 A buffer block can have data items updated by one or
more transactions.
CHECKPOINTS:
 We modify the log-based recovery schemes to allow multiple
transactions to execute concurrently.
 All transactions share a single disk buffer and a single log
 A buffer block can have data items updated by one or more
transactions.
 Streamline recovery procedure by periodically performing
check pointing.
RESTART RECOVERY:
 When the system recovers from a crash, it constructs two list:
 The undo-list consists of transaction to be done.
 The system constructs the two lists as follows:
 Initially, they are both empty.
 The system scans the log backward, examining each record, until
it finds the first <checkpoint> record:
 For each record found of the form<Ti commit>,it adds Ti to redo-
list.
 For each record found of the form<Ti start>,if Ti is not in redo-
list, then it adds Ti to undo-list.
 When the system has examined all the appropriate log records, it
checks the list L in the checkpoint record.
 For each transaction Ti in L, if Ti is not in redo-list, then it adds
Ti to undo-list.
SHADOW PAGING:
 Shadow paging is an alternative to log-based recovery.
 IDEA: maintain two page tables during the lifetime of a
transaction .
 Store the shadow page table in nonvolatile storage, such that state
of the database prior to transaction execution may be recovered.
 Only current page table is used for data item accesses during
execution of the transaction.
 TO COMMIT A TRANSACTION :
1. Flush all modified pages in main memory to disk
2. Output current page table to disk
3. Make the current page table the new shadow page table, as
follows:
 keep a pointer to the shadow page table at a fixed (known)
location on disk.
 to make the current page table the new shadow page table,
simply update the pointer to point to current page table on disk.
 BUFFER MANAGEMENT:
 LOG RECORD BUFFERING: log records are buffered in
main memory, instead of being output directly to stable storage.
 Log force is performed to commit a transaction by forcing all its
log records (including the commit record) to stable storage.
 Several log records can thus be output using a single output
operation, reducing the I/O cost.
 DATABASE BUFFERING :
 Database maintains an in-memory buffer of data blocks.
 When a new block is needed, if buffer is full an existing block
needs to be removed from buffer.
 If the block chosen for removal has been updated, it must be
output to disk.
 If a block with uncommitted updates is output to disk, log
records with undo information for the updates are output to the
log on stable storage first.
 OPERATING SYSTEM ROLE IN BUFFER
MANAGEMENT:
 We can manage the database buffer by using one of this
approaches:
 The database system reserves part of main memory to serve as a
buffer that it, rather than the operating system, manages.
 The database system implements its buffer within the virtual
memory provided by the operating system.
 The database system in turn force-output the buffer blocks to the
database, after writing relevant log records to stable storage.
 Unfortunately, almost all current-generation operating systems
retain complete control of virtual memory.
 The operating system reserves space on disk for storing virtual-
memory pages that are not currently in main memory ; this space
is called swap space.
 Although both approaches suffer from some drawbacks, one or
the other must be chosen unless the operating system is designed
to support the requirements of database logging.
Database management

More Related Content

What's hot

Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
Anne Lee
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
Prosanta Ghosh
 
Recovery system
Recovery systemRecovery system
Recovery system
lalithambiga kamaraj
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
Shahed Mohamed
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recovery
acap paei
 
Os
OsOs
Sql server logshipping
Sql server logshippingSql server logshipping
Sql server logshipping
Zeba Ansari
 
Chapter7
Chapter7Chapter7
Chapter7
Ahmed Magdy
 
Processes description and process control.
Processes description and process control.Processes description and process control.
Processes description and process control.
Ahsan Rahim
 
Introduction to data_load
Introduction to data_loadIntroduction to data_load
Introduction to data_load
sramkumar88
 
SAP BASIS Training in Chennai Demo Part-6
SAP BASIS Training in Chennai Demo Part-6SAP BASIS Training in Chennai Demo Part-6
SAP BASIS Training in Chennai Demo Part-6
Thecreating Experts
 
Dfd over flowcharts
Dfd over flowcharts Dfd over flowcharts
Dfd over flowcharts
Ashwathy Nair
 
Recovery system
Recovery systemRecovery system
Recovery system
GowriLatha1
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
Babasab Patil
 
Memory Management
Memory ManagementMemory Management
Memory Management
Shipra Swati
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
Wave Digitech
 

What's hot (16)

Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 
Recovery system
Recovery systemRecovery system
Recovery system
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recovery
 
Os
OsOs
Os
 
Sql server logshipping
Sql server logshippingSql server logshipping
Sql server logshipping
 
Chapter7
Chapter7Chapter7
Chapter7
 
Processes description and process control.
Processes description and process control.Processes description and process control.
Processes description and process control.
 
Introduction to data_load
Introduction to data_loadIntroduction to data_load
Introduction to data_load
 
SAP BASIS Training in Chennai Demo Part-6
SAP BASIS Training in Chennai Demo Part-6SAP BASIS Training in Chennai Demo Part-6
SAP BASIS Training in Chennai Demo Part-6
 
Dfd over flowcharts
Dfd over flowcharts Dfd over flowcharts
Dfd over flowcharts
 
Recovery system
Recovery systemRecovery system
Recovery system
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
 

Similar to Database management

Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
Zainab Almugbel
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdf
KavitaShinde26
 
DBMS Vardhaman.pdf
DBMS Vardhaman.pdfDBMS Vardhaman.pdf
DBMS Vardhaman.pdf
NithishReddy90
 
recovery system
recovery systemrecovery system
recovery system
shreeuva
 
Dbms
DbmsDbms
Transaction unit 1 topic 4
Transaction unit 1 topic 4Transaction unit 1 topic 4
Transaction unit 1 topic 4
avniS
 
Recovery System.pptx
Recovery System.pptxRecovery System.pptx
Recovery System.pptx
ssuserfb9a21
 
Sql server lesson10
Sql server lesson10Sql server lesson10
Sql server lesson10
Ala Qunaibi
 
What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...
Raj vardhan
 
Introduction to oracle
Introduction to oracleIntroduction to oracle
Introduction to oracle
durgaprasad1407
 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
SURBHI SAROHA
 
Dbms
DbmsDbms
Recovery techniques
Recovery techniquesRecovery techniques
Recovery techniques
Dr. C.V. Suresh Babu
 
Dbms
DbmsDbms
SAP ADMINISTRATION
SAP ADMINISTRATIONSAP ADMINISTRATION
SAP ADMINISTRATION
Aly Adel
 
ch-5 advanced db.pdf
ch-5 advanced db.pdfch-5 advanced db.pdf
ch-5 advanced db.pdf
haymanot taddesse
 
Shadow paging
Shadow pagingShadow paging
Shadow paging
GowriLatha1
 
Database
DatabaseDatabase
Database
guest0a6e77
 
Databases: Backup and Recovery
Databases: Backup and RecoveryDatabases: Backup and Recovery
Databases: Backup and Recovery
Damian T. Gordon
 
Introduction to Data Management
Introduction to Data ManagementIntroduction to Data Management
Introduction to Data Management
Cloudbells.com
 

Similar to Database management (20)

Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdf
 
DBMS Vardhaman.pdf
DBMS Vardhaman.pdfDBMS Vardhaman.pdf
DBMS Vardhaman.pdf
 
recovery system
recovery systemrecovery system
recovery system
 
Dbms
DbmsDbms
Dbms
 
Transaction unit 1 topic 4
Transaction unit 1 topic 4Transaction unit 1 topic 4
Transaction unit 1 topic 4
 
Recovery System.pptx
Recovery System.pptxRecovery System.pptx
Recovery System.pptx
 
Sql server lesson10
Sql server lesson10Sql server lesson10
Sql server lesson10
 
What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...
 
Introduction to oracle
Introduction to oracleIntroduction to oracle
Introduction to oracle
 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
 
Dbms
DbmsDbms
Dbms
 
Recovery techniques
Recovery techniquesRecovery techniques
Recovery techniques
 
Dbms
DbmsDbms
Dbms
 
SAP ADMINISTRATION
SAP ADMINISTRATIONSAP ADMINISTRATION
SAP ADMINISTRATION
 
ch-5 advanced db.pdf
ch-5 advanced db.pdfch-5 advanced db.pdf
ch-5 advanced db.pdf
 
Shadow paging
Shadow pagingShadow paging
Shadow paging
 
Database
DatabaseDatabase
Database
 
Databases: Backup and Recovery
Databases: Backup and RecoveryDatabases: Backup and Recovery
Databases: Backup and Recovery
 
Introduction to Data Management
Introduction to Data ManagementIntroduction to Data Management
Introduction to Data Management
 

More from Subha Selvam

Digital image processing
Digital image processingDigital image processing
Digital image processing
Subha Selvam
 
Mobile computing
Mobile computingMobile computing
Mobile computing
Subha Selvam
 
Complier Design
Complier DesignComplier Design
Complier Design
Subha Selvam
 
Software engineering
Software engineeringSoftware engineering
Software engineering
Subha Selvam
 
Web programming
Web programmingWeb programming
Web programming
Subha Selvam
 
Big data
Big dataBig data
Big data
Subha Selvam
 
Data mining
Data miningData mining
Data mining
Subha Selvam
 
Operating system
Operating systemOperating system
Operating system
Subha Selvam
 
Database management
Database managementDatabase management
Database management
Subha Selvam
 
Computer network
Computer networkComputer network
Computer network
Subha Selvam
 
Mathematical foundation in cs
Mathematical foundation in csMathematical foundation in cs
Mathematical foundation in cs
Subha Selvam
 
Java
JavaJava
Sc
ScSc
Ds
DsDs

More from Subha Selvam (14)

Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Mobile computing
Mobile computingMobile computing
Mobile computing
 
Complier Design
Complier DesignComplier Design
Complier Design
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Web programming
Web programmingWeb programming
Web programming
 
Big data
Big dataBig data
Big data
 
Data mining
Data miningData mining
Data mining
 
Operating system
Operating systemOperating system
Operating system
 
Database management
Database managementDatabase management
Database management
 
Computer network
Computer networkComputer network
Computer network
 
Mathematical foundation in cs
Mathematical foundation in csMathematical foundation in cs
Mathematical foundation in cs
 
Java
JavaJava
Java
 
Sc
ScSc
Sc
 
Ds
DsDs
Ds
 

Recently uploaded

ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
ToshihiroIto4
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
SkillCertProExams
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
artemacademy2
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
OECD Directorate for Financial and Enterprise Affairs
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
gpww3sf4
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
samililja
 
Updated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidismUpdated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidism
Faculty of Medicine And Health Sciences
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
1990 Media
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
OECD Directorate for Financial and Enterprise Affairs
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
OECD Directorate for Financial and Enterprise Affairs
 

Recently uploaded (20)

ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
 
Updated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidismUpdated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidism
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
 

Database management

  • 1. RELATIONAL DATABASE MANAGEMENT SYSTEM TRANSACTION MANAGEMENT By, S.Subhalakshmi, M.Sc(cs). Nadar saraswathi college of arts and science.
  • 2. TRANSACTION MANAGEMENT:  A Transaction is a very small unit of a program and it may contain several low level tasks.  A Transaction in a database system must maintain Atomicity, Consistency, Isolation, and Durability − commonly known as ACID properties.  In order to ensure accuracy, completeness, and data integrity.
  • 3. FAILURE CLASSIFICATION:  The simplest type of failure is one that does not result in the loss of information in the system.  There are various types of failure that may occur in a system.  The failures that are more difficult to deal with are those that result in loss of information.  The following types of failures are:
  • 4. TRANSACTION FAILURE:  There are two types of errors that may cause a transaction to fail:  LOGICAL ERROR :transaction cannot complete due to some internal error condition.  SYSTEM ERROR: the database system must terminate an active transaction due to an error condition (e.g., deadlock).
  • 5.  SYSTEM CRASH: a power failure or other hardware or software failure causes the system to crash.  FAIL-STOPASSUMPTION: non-volatile storage contents are assumed to not be corrupted by system crash.  DISK FAILURE: a head crash or similar disk failure destroys all or part of disk storage.  DESTRUCTION IS ASSUMED TO BE DETECTABLE: disk drives use checksums to detect failures.
  • 6. RECOVERY WITH CONCURRENT TRANSACTIONS :  We modify the log-based recovery schemes to allow multiple transactions to execute concurrently.  All transactions share a single disk buffer and a single log.  A buffer block can have data items updated by one or more transactions.
  • 7. CHECKPOINTS:  We modify the log-based recovery schemes to allow multiple transactions to execute concurrently.  All transactions share a single disk buffer and a single log  A buffer block can have data items updated by one or more transactions.  Streamline recovery procedure by periodically performing check pointing.
  • 8. RESTART RECOVERY:  When the system recovers from a crash, it constructs two list:  The undo-list consists of transaction to be done.  The system constructs the two lists as follows:  Initially, they are both empty.  The system scans the log backward, examining each record, until it finds the first <checkpoint> record:
  • 9.  For each record found of the form<Ti commit>,it adds Ti to redo- list.  For each record found of the form<Ti start>,if Ti is not in redo- list, then it adds Ti to undo-list.  When the system has examined all the appropriate log records, it checks the list L in the checkpoint record.  For each transaction Ti in L, if Ti is not in redo-list, then it adds Ti to undo-list.
  • 10. SHADOW PAGING:  Shadow paging is an alternative to log-based recovery.  IDEA: maintain two page tables during the lifetime of a transaction .  Store the shadow page table in nonvolatile storage, such that state of the database prior to transaction execution may be recovered.  Only current page table is used for data item accesses during execution of the transaction.
  • 11.
  • 12.  TO COMMIT A TRANSACTION : 1. Flush all modified pages in main memory to disk 2. Output current page table to disk 3. Make the current page table the new shadow page table, as follows:  keep a pointer to the shadow page table at a fixed (known) location on disk.  to make the current page table the new shadow page table, simply update the pointer to point to current page table on disk.
  • 13.  BUFFER MANAGEMENT:  LOG RECORD BUFFERING: log records are buffered in main memory, instead of being output directly to stable storage.  Log force is performed to commit a transaction by forcing all its log records (including the commit record) to stable storage.  Several log records can thus be output using a single output operation, reducing the I/O cost.
  • 14.  DATABASE BUFFERING :  Database maintains an in-memory buffer of data blocks.  When a new block is needed, if buffer is full an existing block needs to be removed from buffer.  If the block chosen for removal has been updated, it must be output to disk.  If a block with uncommitted updates is output to disk, log records with undo information for the updates are output to the log on stable storage first.
  • 15.  OPERATING SYSTEM ROLE IN BUFFER MANAGEMENT:  We can manage the database buffer by using one of this approaches:  The database system reserves part of main memory to serve as a buffer that it, rather than the operating system, manages.  The database system implements its buffer within the virtual memory provided by the operating system.  The database system in turn force-output the buffer blocks to the database, after writing relevant log records to stable storage.
  • 16.  Unfortunately, almost all current-generation operating systems retain complete control of virtual memory.  The operating system reserves space on disk for storing virtual- memory pages that are not currently in main memory ; this space is called swap space.  Although both approaches suffer from some drawbacks, one or the other must be chosen unless the operating system is designed to support the requirements of database logging.