Distributed Transactions Flashcards

1
Q

What are Transactions?

A

A transaction is a set of related sequential operations that is guaranteed by the server to be atomic in the presence of multiple clients and server crashes.

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

What are the Properties of database transactions intended to guarantee data validity?

A

-Atomicity: a transaction should be all or nothing
-Consistency: a transaction takes the system from one consistent state to another consistent state.
-Isolation: each transaction must be performed without interference.
-Durability: After a transaction has completed successfully, all its effects are saved in permanent storage.

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

Locking is a concurrency control method. How does it work?

A

-Locks regulate access and ensure transaction isolation and data consistency.
-Lock set on each object just before it is accessed.
-Lock is labelled with the transaction identifier.
-Only the transaction that holds the lock can access the object.
-Locks removed when the transaction has completed.
-Can lead to deadlocks.

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

What is Optimistic Concurrency Control?

A

-OCC transactions proceed optimistically assuming that conflicts are rare.
-It allows multiple transactions to proceed concurrently without blocking each other.

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

What are the steps of OCC?

A

1.Set up
2.Read phase
3. Validation Phase
4.Commit Phase

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

What are Timestamp Ordering steps?

A

1.Timestamp assignment.
2.Read and write operations.
3.Validation phase.
4.Commit or Abort.

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

What are Dirty Reads?

A

A dirty read occurs when one transaction reads data that has been modified by another transaction that has not yet been comitted.

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

What are Premature Writes?

A

A premature write is when multiple transactions attempt to write the same object or data item.

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