Week 8 UAS Flashcards

1
Q

What is Transaction?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Four basic (ACID) properties that define a transaction?

A
  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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Concurrency Control?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

3 examples of potential problems caused by concurrency?

A
  1. Lost update problem.
  2. Uncommitted dependency problem.
  3. Inconsistent analysis problem.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Serializabilty?

A

Serializability identifies those executions of transactions guaranteed to ensure consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Two basic concurrency control techniques?

A
  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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Two-phase locking (2PL)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Deadlock and 3 techniques for handling deadlock?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

3 phases of Optimistic Techniques?

A
  1. Read
  2. Validation
  3. Write
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Granularity of Data Items - Ranging from coarse to fine

A
  1. The entire database
  2. a file
  3. a page
  4. a record
  5. a field value of a record
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DBMS should provide following facilities to assist with recovery:

A
  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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is checkpoint?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

3 main recovery techniques?

A
  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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Look at five advanced transaction models:

A
  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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly