Week 8 UAS Flashcards Preview

Database Systems > Week 8 UAS > Flashcards

Flashcards in Week 8 UAS Deck (14):

What is Transaction?

Action, or series of actions, carried out by user or application, which reads or updates contents of database.

Can have one of two outcomes:
1. Success - transaction commits and
database reaches a new consistent state.
2. Failure - transaction aborts, and database must be restored to consistent state before it started.
- Such a transaction is rolled back or undone.


Four basic (ACID) properties that define a transaction?

1. Atomicity ‘All or nothing’ property.
2. Consistency Must transform database from one consistent state to another.
3. Isolation Partial effects of incomplete transactions should not be visible to other transactions.
4. Durability Effects of a committed transaction are permanent and must not be lost because of later failure.


What is Concurrency Control?

Process of managing simultaneous operations on the database without having them interfere with one another.


3 examples of potential problems caused by concurrency?

1. Lost update problem.
2. Uncommitted dependency problem.
3. Inconsistent analysis problem.



Serializability identifies those executions of transactions guaranteed to ensure consistency.


Two basic concurrency control techniques?

1. Locking, a procedure used to control concurrent access to data. To deny access to other transaction and so prevent incorrect updates.
2. Timestamping, A concurrency control protocol that orders transactions in such a way that older transactions, transactions with smaller timestamps, get priority in the event of conflict.


What is Two-phase locking (2PL)

A transaction follow the two-phase locking protocol if all locking operations precede the first unlock operation in the transaction


What is Deadlock and 3 techniques for handling deadlock?

An impasse that may result when two (or more) transactions are each waiting for locks to be released that are held by the other.

3 general techniques for handling deadlock?
1. timeouts
2. deadlock prevention
3. deadlock detection and recovery


3 phases of Optimistic Techniques?

1. Read
2. Validation
3. Write


Granularity of Data Items - Ranging from coarse to fine

1. The entire database
2. a file
3. a page
4. a record
5. a field value of a record


DBMS should provide following facilities to assist with recovery:

1. Backup mechanism, which makes periodic backup copies of database.
2. Logging facilities, which keep track of current state of transactions and database changes.
3. Checkpoint facility, which enables updates to database in progress to be made permanent.
4. Recovery manager, which allows DBMS to restore database to consistent state following a failure.


What is checkpoint?

the point of synchronization between database and log file. All buffers are force-written to secondary storage.


3 main recovery techniques?

1. Deferred update, updates are not written to the database until after a transaction has reached its commit point.
2. immediate update, updates are applied to the database as they occur without waiting to reach the commit point.
3. shadow paging, maintains two-page tables during the life of a transaction: a current page table and a shadow page table.


Look at five advanced transaction models:

1. Nested Transaction Model
2. Sagas
3. Multi-level Transaction Model
4. Dynamic Restructuring, main advantages:
a. Adaptive recovery.
b. Reducing isolation.
5. Workflow Models