transactions_flashcards

1
Q

What does ACID stand for in database transactions?

A

Atomicity, Consistency, Isolation, Durability

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

What is Atomicity in the context of transactions?

A

A transaction is all-or-nothing; if one part fails, the whole transaction fails.

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

What is Consistency in the context of transactions?

A

A transaction brings the database from one valid state to another, maintaining database rules.

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

What is Isolation in ACID?

A

Transactions are executed independently and transparently.

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

What is Durability in ACID?

A

Once a transaction is committed, its effects are permanent even in case of a crash.

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

What is a deadlock?

A

A situation where two or more transactions wait indefinitely for each other to release locks.

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

What are two types of locking?

A

Shared lock (read only) and Exclusive lock (read/write).

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

What is optimistic concurrency control?

A

Assumes conflicts are rare and resolves them after they occur, using versioning.

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

What is the purpose of concurrency control?

A

To prevent data inconsistencies due to simultaneous operations.

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

What is a two-phase locking protocol?

A

A method to ensure serializability with a growing phase (acquire locks) and a shrinking phase (release locks).

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