Transactions Flashcards

1
Q

A __________ is a sequence of operations on database objects

A

transaction

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

All operation in a transaction formed together is a single ________ _____

A

logical unit

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

What are 5 states in the life-cycle of a transaction?

A
  • Active
  • Partially committed
  • Failed
  • Committed
  • Aborted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

An active transaction is in ______ execution state

A

normal

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

A partially committed transaction just had its _____ statement executed

A

last

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

A failed transaction cannot _______

A

proceed

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

An aborted transaction _____ _____ the database

A

rolls back

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

A committed transaction _______ and its changes are ________

A

succeeded, permanent

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

What is a schedule?

A

a sequence S of operations from a set of transactions

where the order of operations of each Ti is the same as in S

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

When is a schedule serial?

A

All operations of each transaction are executed before or after all operations of another

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

Concurrent execution _________ different transaction operations

A

interleaves

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

Concurrent execution increases ________ and reduces ______ _____

A

throughput, response time

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

What does ACID stand for?

A

Atomicity (all or nothing)
Consistency (DB good after transaction)
Isolation
Durability (changes persist)

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

The only important operation in scheduling are _____ and ____

A

read, write

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

When are two operation conflicting?

A

They refer to the same data item and one or more of them is a write

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

Two consecutive ______________ operation can be swapped

A

non-conflicting

17
Q

A schedule is ______ ___________ it it can be turned into a serial schedule by a sequence of swaps

A

conflict serializable

18
Q

In a precedence graph, each node is a _________ and each edge is a _______

A

transaction, conflict

19
Q

A schedule is conflict serializable IFF graph is ______

20
Q

If one transaction aborts, we _____ the other one

21
Q

A schedule is unrecoverable if one T aborts and the other ______

22
Q

A shared (read) lock can be acquired by ______ transactions

23
Q

An exclusive (read/write) lock can be required by only ____ transaction

24
Q

Two locks on the same data item are _________ of one of them is exclusive

A

conflicting

25
In two phase locking, transactions cannot request additional locks once it ________ ____ _____
releases any lock
26
Every schedule of committed transactions that follow 2PL is ______ _______-
conflict serializable
27
In strict 2PL all locks held by a transaction are _________ when it aborts or commits
released
28
Strict 2PL is always __________
recoverable
29
A deadlock is a cycle of ____
waits
30
An older transaction has higher _______
priority
31
The higher priority transaction is never ______
aborted
32
What is starvation?
a transaction keeps being aborted | because it never has su!ciently high priority
33
What are two policies to prevent deadlocks?
- Wait-die | - Wound-wait
34
In the wait-die policy, older Ts wait for younger Ts and younger Ts get ________
aborted
35
In the wound-wait policy, older Ts abort the younger Ts and younger Ts ____
wait
36
A ______ ___ _____ is obtained from a resource allocation graph
waits for graph
37
Each cycle in a waits for graph represents a _________
deadlock
38
What is ARIES?
a recovery algorithm used in major DBMSs