尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
C H A P T E R 9
INTRODUCTION TO
TRANSACTION PROCESSING
Introduction to Transaction
Processing
1
Introduction
 One criterion for classifying a database system is
according to the number of users who can use the
system concurrently-that is, at the same time.
 A DBMS is single-user if at most one user at a time
can use the system, and it is multiuser if many users
can use the system-and hence access the database-
concurrently.
 Single-user DBMSs are mostly restricted to personal
computer systems; most other DBMSs are multiuser.
Introduction to Transaction Processing
2
Introduction
 Multiple users can access databases-and use
computer systems-simultaneously because of the
concept of multiprogramming, which allows the
computer to execute multiple programs-or
processes-at the same time.
 If only a single central processing unit (CPU) exists,
it can actually execute at most one process at a time.
Introduction to Transaction Processing
3
Introduction
 However, multiprogramming operating systems
execute some commands from one process, then
suspend that process and execute some commands
from the next process, and so on.
 A process is resumed at the point where it was
suspended whenever it gets its turn to use the CPU
again.
 Hence, concurrent execution of processes is actually
interleaved.
Introduction to Transaction Processing
4
Introduction
 Figure , shows two processes A and B executing
concurrently in an interleaved fashion.
 Interleaving keeps the CPU busy when a process
requires an input or output (r/o) operation, such as
reading a block from disk.
Introduction to Transaction Processing
5
Introduction
 The CPU is switched to execute another process
rather than remaining idle during r/o time.
 Interleaving also prevents a long process from
delaying other processes.
 If the computer system has multiple hardware
processors (CPUs), parallel processing of multiple
processes is possible, as illustrated by processes C
and D in Figure.
Introduction to Transaction Processing
6
Transactions
 A transaction is an executing program that forms a
logical unit of database processing.
 A transaction includes one or more database access
operations-these can include insertion, deletion,
modification, or retrieval operations.
 The database operations that form a transaction can
either be embedded within an application program
or they can be specified interactively via a high-level
query language such as SQL.
Introduction to Transaction Processing
7
 One way of specifying the transaction boundaries is
by specifying explicit begin transaction and end
transaction statements in an application program;
in this case, all database access operations between
the two are considered as forming one transaction.
Introduction to Transaction Processing
8
Read and Write Operations
 The basic database access operations that a
transaction can include are as follows:
 read_item(X): Reads a database item named X
into a program variable.
 write_item(X): Writes the value of program
variable X into the database item namedX.
Introduction to Transaction Processing
9
DBMS Buffers
 The DBMS will generally maintain a number of
buffers in main memory that hold database disk
blocks containing the database items being
processed.
 When these buffers are all occupied, and additional
database blocks must be copied into memory, some
buffer replacement policy is used to choose which of
the current buffers is to be replaced.
 If the chosen buffer has been modified, it must be
written back to disk before it is reused.
Introduction to Transaction Processing
10
Why Concurrency Control Is Needed
 Several problems can occur when concurrent
transactions execute in an uncontrolled manner.
 Figure 2( a) shows a transaction T1 that transfers N
reservations from one flight whose number of
reserved seats is stored in the database item named
X to another flight whose number of reserved seats is
stored in the database item named Y.
 Figure 2(b) shows a simpler transaction T2 that just
reserves M seats on the first flight (X) referenced in
transaction T1.
Introduction to Transaction Processing
11
Why Concurrency Control Is Needed
 The Lost Update Problem: This problem occurs
when two transactions that access the same database
items have their operations interleaved in a way that
makes the value of some database items incorrect.
Introduction to Transaction Processing
12
Why Concurrency Control Is Needed
Introduction to Transaction Processing
13
Why Concurrency Control Is Needed
 The Temporary Update (or Dirty Read)
Problem.
 This problem occurs when one transaction updates a
database item and then the transaction fails for some
reason.
 The updated item is accessed by another transaction
before it is changed back to its original value.
Introduction to Transaction Processing
14
Why Concurrency Control Is Needed
The value of item X that is read by T2 is called dirty data,
because it has been created by a transaction that has not
completed and committed yet; hence, this problem is also
known as the dirty read problem.
Introduction to Transaction Processing
15
Why Concurrency Control Is Needed
 The Incorrect Summary Problem:
 If one transaction is calculating an aggregate
summary function on a number of records while
other transactions are updating some of these
records, the aggregate function may calculate some
values before they are updated and others after they
are updated.
Introduction to Transaction Processing
16
Why Concurrency Control Is Needed
Introduction to Transaction Processing
17
 For example: Suppose that a transaction T3 is
calculating the total number of reservations on all
the flights; meanwhile, transaction T1 is executing.
 If the interleaving of operations occurs, the result of
T3 will be off by an amount N because T3 reads the
value of X after N seats have been subtracted from it
but reads the value of Y before those N seats have
been added to it.
Why Concurrency Control Is Needed
Introduction to Transaction Processing
18
 Another problem that may occur is called
unrepeatable read, where a transaction T reads an
item twice and the item is changed by another
transaction T' between the two reads.
 Hence, T receives different values for its two reads of
the same item.
Why Recovery Is Needed
Introduction to Transaction Processing
19
 Whenever a transaction is submitted to a DBMS for
execution, the system is responsible for making sure
that either
 all the operations in the transaction are completed
successfully and their effect is recorded permanently
in the database, or
 the transaction has no effect whatsoever on the
database or on any other transactions.
 The DBMS must not permit some operations of a
transaction T to be applied to the database while
other operations of T are not.
Types of Failures
Introduction to Transaction Processing
20
 A computer failure (system crash):
 A hardware, software, or network error occurs in the computer
system during transaction execution.
 Hardware crashes are usually media failures-for example,
main memory failure.
 A transaction or system error:
 Some operation in the transaction may cause it to fail, such as
integer overflow or division by zero.
 Transaction failure may also occur because of erroneous
parameter values or because of a logical programming error.
 In addition, the user may interrupt the transaction during its
execution
Types of Failures
Introduction to Transaction Processing
21
 Local errors or exception conditions
detected by the transaction:
 During transaction execution, certain conditions may occur
that necessitate cancellation of the transaction.
 For example, data for the transaction may not be found. Notice
that an exception condition," such as insufficient account
balance in a banking database, may cause a transaction, such
as a fund withdrawal, to be canceled.
 This exception should be programmed in the transaction itself,
and hence would not be considered a failure.
Types of Failures
Introduction to Transaction Processing
22
 Concurrency control enforcement:
 The concurrency control method may decide to abort the transaction,
to be restarted later, because it violates serializability or because
several transactions are in a state of deadlock.
 Disk failure:
 Some disk blocks may lose their data because of a read or write
malfunction or because of a disk read/write head crash. This may
happen during a read or a write operation of the transaction.
 Physical problems and catastrophes:
 This refers to an endless list of problems that includes power or air-
conditioning failure, fire, theft, sabotage, overwriting disks or tapes
by mistake, and mounting of a wrong tape by the operator.
TRANSACTION AND SYSTEM CONCEPTS
Introduction to Transaction Processing
23
 A transaction is an atomic unit of work that is either
completed in its entirety or not done at all.
 For recovery purposes, the system needs to keep
track of when the transaction starts, terminates, and
commits or aborts.
Transaction Operations
Introduction to Transaction Processing
24
 BEGIN_TRANSACTION: This marks the beginning
of transaction execution.
 READ DR WRITE: These specify read or write
operations on the database items that are executed
as part of a transaction.
 END_TRANSACTION: This specifies that READ and
WRITE transaction operations have ended and
marks the end of transaction execution.
Transaction Operations
Introduction to Transaction Processing
25
 COMMIT_TRANSACTION: This signals a successful
end of the transaction so that any changes (updates)
executed by the transaction can be safely committed
to the database and will not be undone.
 ROLLBACK (OR ABORT): This signals that the
transaction has ended unsuccessfully, so that any
changes or effects that the transaction may have
applied to the database must be undone.
Transaction States
Introduction to Transaction Processing
26
Figure shows a state transition diagram that
describes how a transaction moves through its
execution states.
Transaction States
Introduction to Transaction Processing
27
 A transaction goes into an active state immediately
after it starts execution, where it can issue READ and
WRITE operations.
 When the transaction ends, it moves to the partially
committed state.
At this point, some recovery protocols need to ensure
that a system failure will not result in an inability to
record the changes of the transaction permanently.
 Once this check is successful, the transaction is said
to have reached its commit point and enters the
committed state.
Transaction States
Introduction to Transaction Processing
28
 Once a transaction is committed, it has concluded its
execution successfully and all its changes must be
recorded permanently in the database.
 However, a transaction can go to the failed state if
one of the checks fails or if the transaction is aborted
during its active state.
 The transaction may then have to be rolled back to
undo the effect of its WRITE operations on the
database.
 The terminated state corresponds to the transaction
leaving the system.
The System Log
Introduction to Transaction Processing
29
 To be able to recover from failures that affect
transactions, the system maintains a log to keep
track of all transaction operations that affect the
values of database items.
 This information may be needed to permit recovery
from failures.
Commit Point of a Transaction
Introduction to Transaction Processing
30
 A transaction T reaches its commit point when all
its operations that access the database have been
executed successfully and the effect of all the
transaction operations on the database have been
recorded in the log.
 Beyond the commit point, the transaction is said to
be committed, and its effect is assumed to be
permanently recorded in the database. The
transaction then writes a commit record [commit,T]
into the log.
DESIRABLE PROPERTIES OF
TRANSACTIONS
Introduction to Transaction Processing
31
 Atomicity: A transaction is an atomic unit of
processing; it is either performed in its entirety or
not performed at all.
 Consistency preservation: A transaction is
consistency preserving if its complete execution
takes the database from one consistent state to
another.
DESIRABLE PROPERTIES OF
TRANSACTIONS
Introduction to Transaction Processing
32
 Isolation: A transaction should appear as though it
is being executed in isolation from other
transactions. That is, the execution of a transaction
should not be interfered with by any other
transactions executing concurrently.
 Durability or permanency: The changes applied
to the database by a committed transaction must
persist in the database. These changes must not be
lost because of any failure.

More Related Content

What's hot

Information Processess and Technology HSC Transaction processing systems
Information Processess and Technology HSC Transaction processing systemsInformation Processess and Technology HSC Transaction processing systems
Information Processess and Technology HSC Transaction processing systems
pezhappy99
 
Fis 2011-w2
Fis 2011-w2Fis 2011-w2
Fis 2011-w2
oktazia
 
TPS by M.Yameen Shakir
 TPS by M.Yameen Shakir  TPS by M.Yameen Shakir
TPS by M.Yameen Shakir
Muhammad Yameen Shakir
 
Transaction Processing System
Transaction Processing SystemTransaction Processing System
Transaction Processing System
Abdul Aslam
 
TPS Characteristics
TPS CharacteristicsTPS Characteristics
TPS Characteristics
bmasawan
 
Tps
TpsTps
Transaction processing system future programming
Transaction processing system   future programmingTransaction processing system   future programming
Transaction processing system future programming
Future Programming
 
Transaction
TransactionTransaction
Transaction
Amin Omi
 
Tps revision 2017
Tps revision 2017Tps revision 2017
Tps revision 2017
greg robertson
 
Transaction ps
Transaction psTransaction ps
Transaction ps
MR Z
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
koolkampus
 
Transaction slide
Transaction slideTransaction slide
Transaction slide
shawon roy
 
Transaction processing system
Transaction processing systemTransaction processing system
Transaction processing system
Jayson Jueco
 
de Leoz Quiz # 3
de Leoz Quiz # 3de Leoz Quiz # 3
de Leoz Quiz # 3
caradeleoz
 
Concurrency Control.
Concurrency Control.Concurrency Control.
Transaction processing system
Transaction processing systemTransaction processing system
Transaction processing system
university of education,Lahore
 
Tybsc cs dbms2 notes
Tybsc cs dbms2 notesTybsc cs dbms2 notes
Tybsc cs dbms2 notes
Niraj Bharambe
 
Tranasaction management
Tranasaction managementTranasaction management
Tranasaction management
Dr. C.V. Suresh Babu
 
Lec08
Lec08Lec08
Lec08
saryu2011
 
Crash recovery in database
Crash recovery in databaseCrash recovery in database
Crash recovery in database
Prof.Nilesh Magar
 

What's hot (20)

Information Processess and Technology HSC Transaction processing systems
Information Processess and Technology HSC Transaction processing systemsInformation Processess and Technology HSC Transaction processing systems
Information Processess and Technology HSC Transaction processing systems
 
Fis 2011-w2
Fis 2011-w2Fis 2011-w2
Fis 2011-w2
 
TPS by M.Yameen Shakir
 TPS by M.Yameen Shakir  TPS by M.Yameen Shakir
TPS by M.Yameen Shakir
 
Transaction Processing System
Transaction Processing SystemTransaction Processing System
Transaction Processing System
 
TPS Characteristics
TPS CharacteristicsTPS Characteristics
TPS Characteristics
 
Tps
TpsTps
Tps
 
Transaction processing system future programming
Transaction processing system   future programmingTransaction processing system   future programming
Transaction processing system future programming
 
Transaction
TransactionTransaction
Transaction
 
Tps revision 2017
Tps revision 2017Tps revision 2017
Tps revision 2017
 
Transaction ps
Transaction psTransaction ps
Transaction ps
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
Transaction slide
Transaction slideTransaction slide
Transaction slide
 
Transaction processing system
Transaction processing systemTransaction processing system
Transaction processing system
 
de Leoz Quiz # 3
de Leoz Quiz # 3de Leoz Quiz # 3
de Leoz Quiz # 3
 
Concurrency Control.
Concurrency Control.Concurrency Control.
Concurrency Control.
 
Transaction processing system
Transaction processing systemTransaction processing system
Transaction processing system
 
Tybsc cs dbms2 notes
Tybsc cs dbms2 notesTybsc cs dbms2 notes
Tybsc cs dbms2 notes
 
Tranasaction management
Tranasaction managementTranasaction management
Tranasaction management
 
Lec08
Lec08Lec08
Lec08
 
Crash recovery in database
Crash recovery in databaseCrash recovery in database
Crash recovery in database
 

Viewers also liked

Introduction to Transaction Processing Chapter No. 2
Introduction to Transaction Processing   Chapter No. 2Introduction to Transaction Processing   Chapter No. 2
Introduction to Transaction Processing Chapter No. 2
Qamar Farooq
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
Jafar Nesargi
 
Connecting Classrooms To Primary Sources
Connecting Classrooms To Primary SourcesConnecting Classrooms To Primary Sources
Connecting Classrooms To Primary Sources
Johnbuchinger
 
Pakistan international airline
Pakistan international airline Pakistan international airline
Pakistan international airline
Sameen Salman
 
Transaction Processing System (TPS)
Transaction Processing System (TPS)Transaction Processing System (TPS)
Transaction Processing System (TPS)
Anvesh Sharma
 
Record storage and primary file organization
Record storage and primary file organizationRecord storage and primary file organization
Record storage and primary file organization
Jafar Nesargi
 
Information processing cycle
Information processing cycleInformation processing cycle
Information processing cycle
Criselda Liscano
 
01 Information Processing Cycle
01 Information Processing Cycle01 Information Processing Cycle
01 Information Processing Cycle
ryan.hackl
 
Tps Presentation
Tps PresentationTps Presentation
Tps Presentation
Apex
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
Jafar Nesargi
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
Jafar Nesargi
 
Dbms ii mca-ch9-transaction-processing-2013
Dbms ii mca-ch9-transaction-processing-2013Dbms ii mca-ch9-transaction-processing-2013
Dbms ii mca-ch9-transaction-processing-2013
Prosanta Ghosh
 
Transaction Processing System
Transaction Processing SystemTransaction Processing System
Transaction Processing System
Mohammed Kashifulla
 
File organisation
File organisationFile organisation
File organisation
Suneel Dogra
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
Sher Singh Bardhan
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
kamal kotecha
 
2 tier and 3 tier architecture
2 tier and 3 tier architecture2 tier and 3 tier architecture
2 tier and 3 tier architecture
baabtra.com - No. 1 supplier of quality freshers
 
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Beat Signer
 
24. Advanced Transaction Processing in DBMS
24. Advanced Transaction Processing in DBMS24. Advanced Transaction Processing in DBMS
24. Advanced Transaction Processing in DBMS
koolkampus
 
Transaction processing system
Transaction processing systemTransaction processing system
Transaction processing system
uday sharma
 

Viewers also liked (20)

Introduction to Transaction Processing Chapter No. 2
Introduction to Transaction Processing   Chapter No. 2Introduction to Transaction Processing   Chapter No. 2
Introduction to Transaction Processing Chapter No. 2
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Connecting Classrooms To Primary Sources
Connecting Classrooms To Primary SourcesConnecting Classrooms To Primary Sources
Connecting Classrooms To Primary Sources
 
Pakistan international airline
Pakistan international airline Pakistan international airline
Pakistan international airline
 
Transaction Processing System (TPS)
Transaction Processing System (TPS)Transaction Processing System (TPS)
Transaction Processing System (TPS)
 
Record storage and primary file organization
Record storage and primary file organizationRecord storage and primary file organization
Record storage and primary file organization
 
Information processing cycle
Information processing cycleInformation processing cycle
Information processing cycle
 
01 Information Processing Cycle
01 Information Processing Cycle01 Information Processing Cycle
01 Information Processing Cycle
 
Tps Presentation
Tps PresentationTps Presentation
Tps Presentation
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
Dbms ii mca-ch9-transaction-processing-2013
Dbms ii mca-ch9-transaction-processing-2013Dbms ii mca-ch9-transaction-processing-2013
Dbms ii mca-ch9-transaction-processing-2013
 
Transaction Processing System
Transaction Processing SystemTransaction Processing System
Transaction Processing System
 
File organisation
File organisationFile organisation
File organisation
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
2 tier and 3 tier architecture
2 tier and 3 tier architecture2 tier and 3 tier architecture
2 tier and 3 tier architecture
 
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
 
24. Advanced Transaction Processing in DBMS
24. Advanced Transaction Processing in DBMS24. Advanced Transaction Processing in DBMS
24. Advanced Transaction Processing in DBMS
 
Transaction processing system
Transaction processing systemTransaction processing system
Transaction processing system
 

Similar to Chapter 9 introduction to transaction processing

Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011
sumit_study
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
Janagi Raman S
 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
SURBHI SAROHA
 
_transaction_processing.pptx
_transaction_processing.pptx_transaction_processing.pptx
_transaction_processing.pptx
HarshaVardhanReddy305916
 
Chapter17
Chapter17Chapter17
14261 transaction processing
14261 transaction processing14261 transaction processing
14261 transaction processing
Anuj Agarwal
 
transaction mgr (7) (1).ppt
transaction mgr (7) (1).ppttransaction mgr (7) (1).ppt
transaction mgr (7) (1).ppt
PavanKumar980917
 
chp13.pdf
chp13.pdfchp13.pdf
chp13.pdf
cscmsai54
 
24904 lecture11
24904 lecture1124904 lecture11
UNIT-IV: Transaction Processing Concepts
UNIT-IV: Transaction Processing ConceptsUNIT-IV: Transaction Processing Concepts
UNIT-IV: Transaction Processing Concepts
Raj vardhan
 
DBMS Unit III Material
DBMS Unit III MaterialDBMS Unit III Material
DBMS Unit III Material
ArthyR3
 
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
 
Dartabase Transaction.pptx
Dartabase Transaction.pptxDartabase Transaction.pptx
Dartabase Transaction.pptx
Bibus Poudel
 
Ch15
Ch15Ch15
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
Rajeev Rastogi (KRR)
 
DBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlDBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency Control
Mukesh Tekwani
 
Unit 5
Unit 5Unit 5
Unit 5
Abha Damani
 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction management
Dr. C.V. Suresh Babu
 
Data (1)
Data (1)Data (1)
Data (1)
Ankit Anand
 
database1.pptx
database1.pptxdatabase1.pptx
database1.pptx
OmarKamil1
 

Similar to Chapter 9 introduction to transaction processing (20)

Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
 
_transaction_processing.pptx
_transaction_processing.pptx_transaction_processing.pptx
_transaction_processing.pptx
 
Chapter17
Chapter17Chapter17
Chapter17
 
14261 transaction processing
14261 transaction processing14261 transaction processing
14261 transaction processing
 
transaction mgr (7) (1).ppt
transaction mgr (7) (1).ppttransaction mgr (7) (1).ppt
transaction mgr (7) (1).ppt
 
chp13.pdf
chp13.pdfchp13.pdf
chp13.pdf
 
24904 lecture11
24904 lecture1124904 lecture11
24904 lecture11
 
UNIT-IV: Transaction Processing Concepts
UNIT-IV: Transaction Processing ConceptsUNIT-IV: Transaction Processing Concepts
UNIT-IV: Transaction Processing Concepts
 
DBMS Unit III Material
DBMS Unit III MaterialDBMS Unit III Material
DBMS Unit III Material
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 
Dartabase Transaction.pptx
Dartabase Transaction.pptxDartabase Transaction.pptx
Dartabase Transaction.pptx
 
Ch15
Ch15Ch15
Ch15
 
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
 
DBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlDBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency Control
 
Unit 5
Unit 5Unit 5
Unit 5
 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction management
 
Data (1)
Data (1)Data (1)
Data (1)
 
database1.pptx
database1.pptxdatabase1.pptx
database1.pptx
 

More from Jafar Nesargi

Network adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesNetwork adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devices
Jafar Nesargi
 
An introduction to networking
An introduction to networkingAn introduction to networking
An introduction to networking
Jafar Nesargi
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics Intro
Jafar Nesargi
 
Css
CssCss
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
Jafar Nesargi
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
Jafar Nesargi
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
Jafar Nesargi
 
Chapter3
Chapter3Chapter3
Chapter3
Jafar Nesargi
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracleJafar Nesargi
 
Chapter2
Chapter2Chapter2
Chapter2
Jafar Nesargi
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
Jafar Nesargi
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page development
Jafar Nesargi
 
Introduction to jsp
Introduction to jspIntroduction to jsp
Introduction to jsp
Jafar Nesargi
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
 
Rmi
RmiRmi
Java bean
Java beanJava bean
Java bean
Jafar Nesargi
 
Networking
NetworkingNetworking
Networking
Jafar Nesargi
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
Jafar Nesargi
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
Jafar Nesargi
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracleJafar Nesargi
 

More from Jafar Nesargi (20)

Network adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesNetwork adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devices
 
An introduction to networking
An introduction to networkingAn introduction to networking
An introduction to networking
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics Intro
 
Css
CssCss
Css
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
Chapter3
Chapter3Chapter3
Chapter3
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
 
Chapter2
Chapter2Chapter2
Chapter2
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page development
 
Introduction to jsp
Introduction to jspIntroduction to jsp
Introduction to jsp
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Rmi
RmiRmi
Rmi
 
Java bean
Java beanJava bean
Java bean
 
Networking
NetworkingNetworking
Networking
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
 

Recently uploaded

CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
ThousandEyes
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
NTTDATA INTRAMART
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
Safe Software
 
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State StoreElasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
ScyllaDB
 
Facilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptxFacilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptx
Knoldus Inc.
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
ScyllaDB
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
ThousandEyes
 
ScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDCScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDC
ScyllaDB
 
Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2
DianaGray10
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
manji sharman06
 
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - MydbopsMySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
Mydbops
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
ScyllaDB
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
ScyllaDB
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024
ThousandEyes
 

Recently uploaded (20)

CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
 
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State StoreElasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
 
Facilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptxFacilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptx
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
 
ScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDCScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDC
 
Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
 
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - MydbopsMySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024
 

Chapter 9 introduction to transaction processing

  • 1. C H A P T E R 9 INTRODUCTION TO TRANSACTION PROCESSING Introduction to Transaction Processing 1
  • 2. Introduction  One criterion for classifying a database system is according to the number of users who can use the system concurrently-that is, at the same time.  A DBMS is single-user if at most one user at a time can use the system, and it is multiuser if many users can use the system-and hence access the database- concurrently.  Single-user DBMSs are mostly restricted to personal computer systems; most other DBMSs are multiuser. Introduction to Transaction Processing 2
  • 3. Introduction  Multiple users can access databases-and use computer systems-simultaneously because of the concept of multiprogramming, which allows the computer to execute multiple programs-or processes-at the same time.  If only a single central processing unit (CPU) exists, it can actually execute at most one process at a time. Introduction to Transaction Processing 3
  • 4. Introduction  However, multiprogramming operating systems execute some commands from one process, then suspend that process and execute some commands from the next process, and so on.  A process is resumed at the point where it was suspended whenever it gets its turn to use the CPU again.  Hence, concurrent execution of processes is actually interleaved. Introduction to Transaction Processing 4
  • 5. Introduction  Figure , shows two processes A and B executing concurrently in an interleaved fashion.  Interleaving keeps the CPU busy when a process requires an input or output (r/o) operation, such as reading a block from disk. Introduction to Transaction Processing 5
  • 6. Introduction  The CPU is switched to execute another process rather than remaining idle during r/o time.  Interleaving also prevents a long process from delaying other processes.  If the computer system has multiple hardware processors (CPUs), parallel processing of multiple processes is possible, as illustrated by processes C and D in Figure. Introduction to Transaction Processing 6
  • 7. Transactions  A transaction is an executing program that forms a logical unit of database processing.  A transaction includes one or more database access operations-these can include insertion, deletion, modification, or retrieval operations.  The database operations that form a transaction can either be embedded within an application program or they can be specified interactively via a high-level query language such as SQL. Introduction to Transaction Processing 7
  • 8.  One way of specifying the transaction boundaries is by specifying explicit begin transaction and end transaction statements in an application program; in this case, all database access operations between the two are considered as forming one transaction. Introduction to Transaction Processing 8
  • 9. Read and Write Operations  The basic database access operations that a transaction can include are as follows:  read_item(X): Reads a database item named X into a program variable.  write_item(X): Writes the value of program variable X into the database item namedX. Introduction to Transaction Processing 9
  • 10. DBMS Buffers  The DBMS will generally maintain a number of buffers in main memory that hold database disk blocks containing the database items being processed.  When these buffers are all occupied, and additional database blocks must be copied into memory, some buffer replacement policy is used to choose which of the current buffers is to be replaced.  If the chosen buffer has been modified, it must be written back to disk before it is reused. Introduction to Transaction Processing 10
  • 11. Why Concurrency Control Is Needed  Several problems can occur when concurrent transactions execute in an uncontrolled manner.  Figure 2( a) shows a transaction T1 that transfers N reservations from one flight whose number of reserved seats is stored in the database item named X to another flight whose number of reserved seats is stored in the database item named Y.  Figure 2(b) shows a simpler transaction T2 that just reserves M seats on the first flight (X) referenced in transaction T1. Introduction to Transaction Processing 11
  • 12. Why Concurrency Control Is Needed  The Lost Update Problem: This problem occurs when two transactions that access the same database items have their operations interleaved in a way that makes the value of some database items incorrect. Introduction to Transaction Processing 12
  • 13. Why Concurrency Control Is Needed Introduction to Transaction Processing 13
  • 14. Why Concurrency Control Is Needed  The Temporary Update (or Dirty Read) Problem.  This problem occurs when one transaction updates a database item and then the transaction fails for some reason.  The updated item is accessed by another transaction before it is changed back to its original value. Introduction to Transaction Processing 14
  • 15. Why Concurrency Control Is Needed The value of item X that is read by T2 is called dirty data, because it has been created by a transaction that has not completed and committed yet; hence, this problem is also known as the dirty read problem. Introduction to Transaction Processing 15
  • 16. Why Concurrency Control Is Needed  The Incorrect Summary Problem:  If one transaction is calculating an aggregate summary function on a number of records while other transactions are updating some of these records, the aggregate function may calculate some values before they are updated and others after they are updated. Introduction to Transaction Processing 16
  • 17. Why Concurrency Control Is Needed Introduction to Transaction Processing 17  For example: Suppose that a transaction T3 is calculating the total number of reservations on all the flights; meanwhile, transaction T1 is executing.  If the interleaving of operations occurs, the result of T3 will be off by an amount N because T3 reads the value of X after N seats have been subtracted from it but reads the value of Y before those N seats have been added to it.
  • 18. Why Concurrency Control Is Needed Introduction to Transaction Processing 18  Another problem that may occur is called unrepeatable read, where a transaction T reads an item twice and the item is changed by another transaction T' between the two reads.  Hence, T receives different values for its two reads of the same item.
  • 19. Why Recovery Is Needed Introduction to Transaction Processing 19  Whenever a transaction is submitted to a DBMS for execution, the system is responsible for making sure that either  all the operations in the transaction are completed successfully and their effect is recorded permanently in the database, or  the transaction has no effect whatsoever on the database or on any other transactions.  The DBMS must not permit some operations of a transaction T to be applied to the database while other operations of T are not.
  • 20. Types of Failures Introduction to Transaction Processing 20  A computer failure (system crash):  A hardware, software, or network error occurs in the computer system during transaction execution.  Hardware crashes are usually media failures-for example, main memory failure.  A transaction or system error:  Some operation in the transaction may cause it to fail, such as integer overflow or division by zero.  Transaction failure may also occur because of erroneous parameter values or because of a logical programming error.  In addition, the user may interrupt the transaction during its execution
  • 21. Types of Failures Introduction to Transaction Processing 21  Local errors or exception conditions detected by the transaction:  During transaction execution, certain conditions may occur that necessitate cancellation of the transaction.  For example, data for the transaction may not be found. Notice that an exception condition," such as insufficient account balance in a banking database, may cause a transaction, such as a fund withdrawal, to be canceled.  This exception should be programmed in the transaction itself, and hence would not be considered a failure.
  • 22. Types of Failures Introduction to Transaction Processing 22  Concurrency control enforcement:  The concurrency control method may decide to abort the transaction, to be restarted later, because it violates serializability or because several transactions are in a state of deadlock.  Disk failure:  Some disk blocks may lose their data because of a read or write malfunction or because of a disk read/write head crash. This may happen during a read or a write operation of the transaction.  Physical problems and catastrophes:  This refers to an endless list of problems that includes power or air- conditioning failure, fire, theft, sabotage, overwriting disks or tapes by mistake, and mounting of a wrong tape by the operator.
  • 23. TRANSACTION AND SYSTEM CONCEPTS Introduction to Transaction Processing 23  A transaction is an atomic unit of work that is either completed in its entirety or not done at all.  For recovery purposes, the system needs to keep track of when the transaction starts, terminates, and commits or aborts.
  • 24. Transaction Operations Introduction to Transaction Processing 24  BEGIN_TRANSACTION: This marks the beginning of transaction execution.  READ DR WRITE: These specify read or write operations on the database items that are executed as part of a transaction.  END_TRANSACTION: This specifies that READ and WRITE transaction operations have ended and marks the end of transaction execution.
  • 25. Transaction Operations Introduction to Transaction Processing 25  COMMIT_TRANSACTION: This signals a successful end of the transaction so that any changes (updates) executed by the transaction can be safely committed to the database and will not be undone.  ROLLBACK (OR ABORT): This signals that the transaction has ended unsuccessfully, so that any changes or effects that the transaction may have applied to the database must be undone.
  • 26. Transaction States Introduction to Transaction Processing 26 Figure shows a state transition diagram that describes how a transaction moves through its execution states.
  • 27. Transaction States Introduction to Transaction Processing 27  A transaction goes into an active state immediately after it starts execution, where it can issue READ and WRITE operations.  When the transaction ends, it moves to the partially committed state. At this point, some recovery protocols need to ensure that a system failure will not result in an inability to record the changes of the transaction permanently.  Once this check is successful, the transaction is said to have reached its commit point and enters the committed state.
  • 28. Transaction States Introduction to Transaction Processing 28  Once a transaction is committed, it has concluded its execution successfully and all its changes must be recorded permanently in the database.  However, a transaction can go to the failed state if one of the checks fails or if the transaction is aborted during its active state.  The transaction may then have to be rolled back to undo the effect of its WRITE operations on the database.  The terminated state corresponds to the transaction leaving the system.
  • 29. The System Log Introduction to Transaction Processing 29  To be able to recover from failures that affect transactions, the system maintains a log to keep track of all transaction operations that affect the values of database items.  This information may be needed to permit recovery from failures.
  • 30. Commit Point of a Transaction Introduction to Transaction Processing 30  A transaction T reaches its commit point when all its operations that access the database have been executed successfully and the effect of all the transaction operations on the database have been recorded in the log.  Beyond the commit point, the transaction is said to be committed, and its effect is assumed to be permanently recorded in the database. The transaction then writes a commit record [commit,T] into the log.
  • 31. DESIRABLE PROPERTIES OF TRANSACTIONS Introduction to Transaction Processing 31  Atomicity: A transaction is an atomic unit of processing; it is either performed in its entirety or not performed at all.  Consistency preservation: A transaction is consistency preserving if its complete execution takes the database from one consistent state to another.
  • 32. DESIRABLE PROPERTIES OF TRANSACTIONS Introduction to Transaction Processing 32  Isolation: A transaction should appear as though it is being executed in isolation from other transactions. That is, the execution of a transaction should not be interfered with by any other transactions executing concurrently.  Durability or permanency: The changes applied to the database by a committed transaction must persist in the database. These changes must not be lost because of any failure.
  翻译: