Untitled Deck Flashcards

(26 cards)

1
Q

Define ACID in transactions.

A

ACID stands for Atomicity, Consistency, Isolation, and Durability in database transactions.

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

What does Atomicity ensure in transactions?

A

It ensures that all operations in a transaction are completed successfully or none at all.

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

True or false: Consistency guarantees that a transaction brings the database from one valid state to another.

A

TRUE

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

Fill in the blank: Isolation ensures that transactions do not ______ each other.

A

interfere

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

What is the purpose of Durability in transactions?

A

It guarantees that once a transaction is committed, it will remain so, even in case of a failure.

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

Define transaction in the context of databases.

A

A transaction is a sequence of operations performed as a single logical unit of work.

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

What is a commit in transaction management?

A

A commit finalizes a transaction, making all changes permanent in the database.

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

What is a rollback?

A

A rollback undoes all operations of a transaction, reverting the database to its previous state.

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

True or false: A transaction can be partially completed.

A

FALSE

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

What does serializability mean in transactions?

A

It means that the outcome of concurrent transactions is the same as if they were executed serially.

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

Fill in the blank: Dirty reads occur when a transaction reads data that is ______.

A

not yet committed

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

What is a phantom read?

A

A phantom read occurs when a transaction reads a set of rows that match a condition but finds different rows on subsequent reads.

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

Define isolation level.

A

Isolation levels determine how transaction integrity is visible to other transactions.

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

What are the four standard isolation levels?

A

Read Uncommitted, Read Committed, Repeatable Read, and Serializable.

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

True or false: Read Committed prevents dirty reads.

A

TRUE

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

Fill in the blank: Repeatable Read prevents ______ reads.

A

non-repeatable

17
Q

What is the main advantage of using ACID transactions?

A

They ensure reliable processing of database transactions, maintaining data integrity.

18
Q

What is a transaction log?

A

A transaction log records all changes made to the database to ensure durability and recovery.

19
Q

True or false: ACID properties are only applicable to relational databases.

20
Q

What does two-phase commit ensure?

A

It ensures that all participants in a distributed transaction either commit or rollback together.

21
Q

Fill in the blank: Optimistic concurrency control assumes that ______ will not occur.

22
Q

What is pessimistic concurrency control?

A

It locks resources to prevent conflicts during transaction execution.

23
Q

Define transaction isolation.

A

Transaction isolation is the degree to which the operations in one transaction are isolated from others.

24
Q

What is the ACID test?

A

The ACID test evaluates whether a database transaction adheres to the ACID properties.

25
True or false: ACID transactions can improve performance.
FALSE
26
What is the role of **database management systems (DBMS)** in ACID transactions?
DBMS enforce ACID properties to ensure reliable transaction processing.