Transaction Management Flashcards

1
Q

What is a transaction?

A

A transaction is an operation (or operations) onto a database such as a write operation.

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

What is the purpose of transactions having the atomicity property?

A

Atomicity is the property that a transaction is conducted with no intermediate steps. This means that if the transaction fails, all operations in the transaction are cancelled meaning the database returns to its state pre-transaction. Thus, there is no room for data inconsistency errors.

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

What is the acronym for the 4 transaction properties? Define each property…

A

Atomicity : A transaction with multiple operations is conducted in a single unit. This helps prevent conflicting operations.
Consistency : Transactions act within the constraints of the database.
Isolation : Transactions are conducted in isolation of one another, meaning they can occur concurrently.
Durability : Transactions maintain regardless if system crashes.

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

Define scheduling in regards to database transactions…

A

Scheduling is the way in which concurrent transactions are conducted on a database

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

What are the 2 types of schedule? Define each..

A

Serial : Concurrent operations are not interleaved. Not recommended.
Non serial : Concurrent operations are interleaved.

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

Which type of scheduling is preferred?

A

Non-serial is preferred.

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

What are the 2 main desired properties of a schedule?

A

Serializability and Recoverability

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

What is the purpose of serializability?

A

Serializability ensures atomicity in order to prevent conflicting operations.

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

How do we test for serializability?

A
  1. Create a precedence graph.
  2. Test for cycle.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly