Transaction Managment Flashcards
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