Extra Flashcards
What is a transaction in DBMS?
The Transaction is central to understanding how a database is kept in a complete & consistent state
Purpose of a database is to carry out transactions
transaction is a logical unit of work
Name 4 transaction Properties
Atomicity: Either executed in its entirety or not at all
Consistency: Transforms the database from one consistent state into another consistent state.
Isolation: Executes independently of other transaction
Durability: The effect of a successfully completed transaction are permanently recorded in the database and must not be lost.
What is concurrency Control and what does it do?
Concurrency control is process of managing simultaneous transactions on a database without interfering with each other
It allows more efficient use of resources
It can cause interference and data inconsistencies
Name 3 problems caused by concurrency
Lost update problem
Uncommitted dependency problem
Inconsistent analysis problem
What is the Serialisation principle?
When two transactions operate in a parallel interleaved
manner, then their effects should be the same as if they
operated in a purely serial manner.
Name 2 Types of locks:
Shared Read Lock(S-lock) -Shared reading but not writing
Exclusive Write Lock(X-lock)-
exclusive access.
Name the two phases of two phases locking
Growing Phase - Acquires all locks, but releases none
Shrinking phase - release all locks, but acquires none.