Transaction Management and Concurrency Control Flashcards

1
Q

What does a logical unit of work that must be entirely completed or aborted consist of?

A

SELECT statement

Series of related UPDATE statements

Series of INSERT statements

Combination of SELECT, UPDATE, and INSERT statements

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

What does a consistent database state?

A

All data integrity constraints are satisfied

Must begin with the database in a known consistent state to ensure consistency

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

How are most transactions formed?

A

They are formed by two or more database requests

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

What are database requests?

A

They are the equivalent of a single SQL statement in an application program or transaction

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

Why aren’t all transactions updated in the database?

A

Because SQL code represents a transaction because it accesses the database

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

How can improper or incomplete transactions can have devastating effect on database integrity?

A

Users can define enforceable constraints based on business rules

Other integrity rules are automatically enforced by the DBMS

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

What is atomicity?

A

All operations of a transaction must be completed; if not the transaction is aborted

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

What is consistency?

A

Permanence of database’s consistent state

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

What is isolation?

A

Data used during transaction cannot be used by second transaction until the first is completed

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

What is durability?

A

Ensures that once transactions are committed they cannot be undone or lost

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

What is serializability?

A

Ensures that the schedule for the concurrent execution of several transactions should yield consistent results

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

What SQL statements provide transaction support?

A

COMMIT
ROLLBACK

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

When should the transaction sequence continue until one of four events occur?

A

COMMIT statement is reached
ROLLBACK statement is reached
End of program is reached
Program is abnormally terminated

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

What does a transaction log do?

A

Keeps track of all transactions that update the database

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

What does the DBMS use the information stored in a log for?

A

Recovery requirement triggered by a ROLLBACK statement
Program’s abnormal termination
System failure

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

What is the objective of coordination of the simultaneous transactions execution in a multiuser database system?

A

Ensures serializability of transactions in a multiuser database environment

17
Q

Why is concurrency control important?

A

It is important because the simultaneous execution of transactions over a shared database can create several data integrity and consistency problems

18
Q

What are the three main problems of concurrency control?

A

lost updates
uncommitted data
inconsistent retrievals

19
Q

What is a lost update?

A

Occurs in two concurrent transactions when:

Same data element is updated

One of the updates is lost

20
Q

What is uncommitted data?

A

Occurs when:

Two transactions are executed concurrently

First transaction is rolled back after the second transaction has already accessed uncommitted data

21
Q

What is inconsistent retrivals?

A

Occurs when:

A transaction accesses data before and after one or more other transactions finish working with such data

22
Q

What is the locking method?

A

Locking methods facilitate isolation of data items used in concurrently executing transactions

23
Q

What is a lock?

A

Guarantees exclusive use of a data item to a current transaction

24
Q

What is pessimistic locking?

A

Use of locks based on the assumption that conflict between transactions is likely

25
Q

What is a lock manager?

A

Responsible for assigning and policing the locks used by the transactions