Transaction Processing Flashcards
what is transaction Processing
A mechanism for describing logical units of database processing.
Systems with large databases and hundreds of concurrent users
give examples of transaction processing systems (3)
airline reservations
banking
credit card processing
describe single vs multi user
single- only one access at one time
multi- many users accessing the database
what is interleaving
processes are interleaved to achieve the illusion of concurrency
what are transactions
executing programs
what is a DBMS buffer
In ram, contents swapped out to disk when full
using LRU
what is concurrency
several accesses at the same time are likely to allow concurrent access
what are the problems caused by concurrency (4)
lost update
unrepeatable read
dirty read/temporary update
incorrect summary
what is the lost update problem
2 transactions access the same items such that a value becomes incorrect
what is the dirty read/temporary update problem
a process will read a value when it is in a state. Then the transaction that set that will fail and it will be reverted back.
but the other process has already operated on the incorrect data
what is the unrepeatable read problem
a process will read a value and read it again and it will be different each time
what is the incorrect summary problem
one of the transactions is executing an aggregate operation on several data items, and other transactions are updating one or more of those data items. This causes a inconsistent database state
what risks are there to transactions
computer failure
physical problems
transaction error
logical error or exception
concurrency control enforcement
what happens if a transaction aborts
roll back
what are the transaction states
active partially committed failed committed aborted terminated