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 ______

A

acyclic

20
Q

If one transaction aborts, we _____ the other one

A

abort

21
Q

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

A

commits

22
Q

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

A

multiple

23
Q

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

A

one

24
Q

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

A

conflicting

25
Q

In two phase locking, transactions cannot request additional locks once it ________ ____ _____

A

releases any lock

26
Q

Every schedule of committed transactions that follow 2PL is ______ _______-

A

conflict serializable

27
Q

In strict 2PL all locks held by a transaction are _________ when it aborts or commits

A

released

28
Q

Strict 2PL is always __________

A

recoverable

29
Q

A deadlock is a cycle of ____

A

waits

30
Q

An older transaction has higher _______

A

priority

31
Q

The higher priority transaction is never ______

A

aborted

32
Q

What is starvation?

A

a transaction keeps being aborted

because it never has su!ciently high priority

33
Q

What are two policies to prevent deadlocks?

A
  • Wait-die

- Wound-wait

34
Q

In the wait-die policy, older Ts wait for younger Ts and younger Ts get ________

A

aborted

35
Q

In the wound-wait policy, older Ts abort the younger Ts and younger Ts ____

A

wait

36
Q

A ______ ___ _____ is obtained from a resource allocation graph

A

waits for graph

37
Q

Each cycle in a waits for graph represents a _________

A

deadlock

38
Q

What is ARIES?

A

a recovery algorithm used in major DBMSs