Transaction Managment Flashcards
(36 cards)
How layers has DBMS have
3
The inner most layer ( the kernel ) concerns itself with:
Hardware failure
Software failure
Consistency of the database
Transaction management is further subdivided into:
Transaction support
Concurrency control
Database recovery
Concurrency and recovery control required:
Are required to protect the database from inconsistencies and data loss
Concurrency allow DBMS’s what
Many DBMSs allow users to carry out operations on the database
Concurrency , If the operations are not controlled ,what?
database will become inconsistent
Recovery, mean
Eg.
Explain
Is the process of restoring the database to a correct state following a failure
Ex. A failure may be a result of:
A system crash
A software error
Whatever the reason, DBMS must be able to recover from the failure and restore the database to a consistent state
Consider an application program which processes the sale of stock
Contains a several database operations
Is a read write transaction data is being updated
What transaction
Transaction might be what
Is a logical unit of work on the database
Might be :
An entire computer application
A single command such as select , insert , update , delete
Transaction outcome
Successful:
Transaction completes successfully
Transaction is said to have committed
Transaction unsuccessful
Transaction does not complete successfully
Transaction is aborted
SQL COMMIT statement
Statement makes transaction updates permanent
Signifies a successful transaction
If it is decided that a committed transaction was a mistake :
Another transaction to reverse its effects must be performed
Revert to database backup files
SQL ROLLBACK statement
Statement undoes any transaction updates made since the start of the transaction
Signifies an unsuccessful transaction
Transaction properties
Atomicity
Consistency
Isolation
Durability
Reliability and consistency are compromised when:
Software and hardware failures occur
Must be maintained at all times
Explain Atomicity
All or nothing property
Either the entire transaction is performed or it is not performed at all
If one operation fails, all must be undone
Explain consistency
All transactions must preserve the consistency and integrity of the database.
Isolation mean
Transaction execute independently of one another
Durability
When transaction completes , the updates made by the transaction must be durable
Serialisability mean
Example
Ensures that concurrent execution of several transactions yields consistent results
Ex. T1 = T2 = T3 = result
T2 = T3 = T1 = result
T3 = T2 = T1 = result
What are high level database modules of DBMS Architecture (4)
Transaction
Concurrency
Recovery
Control
Transaction manager
It communicates with the scheduler, the module responsible for implementing a particular strategy for concurrency control
Recovery manager
Ensure that the database is restored to the state it was in at the start of the transaction
Buffer manager
Is responsible for the transfer of data between disk storage and main memory