Transaction Management and Concurrency Control

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/38

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering Unit-IV: Transaction Management and Concurrency Control, including ACID properties, serializability, lock- and timestamp-based protocols, deadlock conditions and handling, and database recovery techniques.

39 Terms

1
New cards

Transaction

A sequence of one or more operations (such as read, write, update, or delete) performed on the database as a single logical unit of work, ensuring all operations are completed or none are applied.

2
New cards

Read operation (Read(X)\text{Read}(X))

An operation used to read the values of a particular database element XX and store it in a temporary buffer in the main memory for further actions, without modifying the database.

3
New cards

Write operation (Write(X)\text{Write}(X))

An operation that stores updated data from main memory back to the database, typically following a read where data is fetched, modified, and then written back.

4
New cards

Commit

An operation that finalizes a transaction and permanently saves all its changes to the database, marking the transaction as successful and maintaining database integrity.

5
New cards

Rollback

An operation that undoes all changes made by a transaction if an error occurs, restoring the database to its last consistent state.

6
New cards

Serial Schedule

A schedule where transactions execute one after another (one by one), ensuring database consistency but reducing overall system performance.

7
New cards

Non-Serial Schedule

A schedule where transactions execute concurrently, improving efficiency but requiring concurrency control mechanisms.

8
New cards

ACID Properties

A set of four fundamental properties (Atomicity, Consistency, Isolation, and Durability) designed to maintain consistency, correctness, and reliability in a database even in the case of failures or errors.

9
New cards

Atomicity

The 'All or Nothing' ACID property ensuring that a transaction is completed fully or not at all, maintained under the responsibility of the Transaction Manager.

10
New cards

Consistency

The ACID property ensuring that a transaction always keeps the database in a valid state with correct data, maintained under the responsibility of the Application Programmer.

11
New cards

Isolation

The ACID property ensuring that multiple transactions executing concurrently stay separate and do not interfere with each other, maintained under the responsibility of Concurrency Control Manager.

12
New cards

Durability

The 'Never lose saved data' ACID property ensuring that once a transaction is committed, its updates remain permanently stored even if the system crashes, maintained under the responsibility of the Recovery Manager.

13
New cards

Serializability

A criterion where multiple transactions execute at the same time in such a way that the final result is identical to the result obtained if they had been executed sequentially one after another.

14
New cards

Conflict Serializability

A type of serializability where a schedule can be transformed into a serial schedule by swapping non-conflicting operations; it is commonly tested using a precedence (serialization) graph.

15
New cards

View Serializability

A more general form of serializability where a schedule produces the same final result (read values and final write) as some serial schedule, even if it is not conflict serializable, though it is harder to test.

16
New cards

Concurrency Control

The process of managing multiple transactions executing simultaneously so that the database remains consistent and accurate without data conflicts.

17
New cards

Lock-Based Protocol

A concurrency control technique where a transaction must lock a data item before accessing it, preventing other transactions from modifying it until that lock is released.

18
New cards

Shared Lock (S-lock)

A lock type used exclusively for read operations that allows multiple transactions to read the same data item simultaneously.

19
New cards

Exclusive Lock (X-lock)

A lock type used for write operations that restricts access so only one transaction can read and write the data item.

20
New cards

Timestamp-Based Protocol

A deadlock-free concurrency control protocol where each transaction is assigned a unique timestamp upon starting and transactions are executed in timestamp order.

21
New cards

Validation-Based Protocol

An optimistic concurrency control protocol where transactions execute without locking, and the DBMS checks for conflicts before committing ('work first, check before saving').

22
New cards

Deadlock

A situation in a multi-user database environment where two or more transactions are waiting for each other to release resources (locks), causing all of them to remain blocked indefinitely in a cycle of dependencies.

23
New cards

Mutual Exclusion

A necessary condition for deadlock stating that only one transaction can hold or use a particular resource at a given time.

24
New cards

Hold and Wait

A necessary condition for deadlock where a transaction holding existing resources is permitted to simultaneously request and wait for additional resources held by others.

25
New cards

No Preemption

A necessary condition for deadlock stating that resources cannot be forcefully taken away from the transaction currently holding them.

26
New cards

Circular Wait

A necessary condition for deadlock where transactions form a circular chain of waiting, with each transaction waiting for a resource held by the next transaction in the cycle.

27
New cards

Deadlock Prevention

A deadlock handling method that structures transaction planning so that at least one of the four necessary deadlock conditions never occurs (e.g., allocating all required resources together or none).

28
New cards

Deadlock Avoidance

A deadlock handling technique where the DBMS dynamically evaluates whether granting a lock will keep the system in a safe state, delaying the request if it is unsafe (e.g., Banker's Algorithm).

29
New cards

Deadlock Detection and Recovery

A deadlock handling strategy that allows deadlocks to occur, detects them using tools like a Wait-For Graph, and recovers by rolling back transactions.

30
New cards

Deadlock Ignorance

A deadlock handling approach where deadlocks are ignored because they occur very rarely, and any occurrences are handled manually by restarting or terminating a transaction.

31
New cards

Database Recovery

The process of restoring a database to a correct and consistent state after a failure (such as a power outage, software bug, or hardware crash) without losing data.

32
New cards

Log-Based Recovery

A common database recovery method that stores every change (insert, update, delete) performed by transactions in a log file on stable storage before applying it to the database.

33
New cards

Undo Operation

A recovery operation that reverses database changes made by uncommitted transactions after a system failure.

34
New cards

Redo Operation

A recovery operation that reapplies database changes made by committed transactions after a system failure to ensure data persistence.

35
New cards

Immediate Update

A log-based recovery technique where the database is updated immediately during execution before commit; upon failure, the system undoes uncommitted changes and redoes committed ones.

36
New cards

Deferred Update

A log-based recovery technique where actual updates to the database occur only after transaction commit; upon failure, no undo is needed, and only redo is performed for committed transactions.

37
New cards

Checkpoint Recovery

A recovery technique where all completed transactions are permanently saved to disk at set points, enabling recovery after a crash to start from the latest checkpoint rather than from the beginning.

38
New cards

Shadow Paging

A recovery technique where the DBMS maintains two copies of the database (the Original Page and the Shadow Page/Backup), making updates only to the new copy and replacing the old copy only if the transaction succeeds.

39
New cards

Backup Recovery

A recovery technique where the database is periodically backed up so that in the event of a disaster, the database can be restored from the latest available backup.