Week 8 Quiz Flashcards

1
Q

What is a transaction?

A

Logical unit of work that must be entirely completed or aborted

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

What does a transaction 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
3
Q

Consistent database state:

A

All data integrity constraints are satisfied

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

Database requests:

A

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

5 transaction properties:

A

Atomicity: All operations of a transaction must be completed

Consistency: Permanence of database’s consistent state:

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

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

Serializability: 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
6
Q

SQL statements that provide transaction support:

A
  • COMMIT

- ROLLBACK

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

Transaction sequence must continue until:

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
8
Q

Features of the transaction log:

A

Keeps track of all transactions that update the database

DBMS uses the information stored in a log for:

  • Recovery requirement triggered by a ROLLBACK statement
  • A program’s abnormal termination
  • A system failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Concurrency control:

A

Coordination of the simultaneous transactions execution in a multiuser database system

Objective - Ensures serializability of transactions in a multiuser database environment

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

Problems in concurrency control:

A

Lost update
Occurs when same data element is updated, or one of the updates is lost

Uncommitted data
Occurs when two transactions are executed concurrently, or if the first transaction is rolled back after the second transaction has already accessed uncommitted data

Inconsistent retrievals
Occurs when a transaction accesses data before and after one or more other transactions finish working with such data

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

Features of the scheduler:

A

Establishes the order in which the operations are executed within concurrent transactions

Creates serialization schedule

Serializable schedule: Interleaved execution of transactions yields the same results as the serial execution of the transactions

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