Transactions Flashcards

1
Q

What is a transaction?

A

A unit of program execution that accesses and possibly updates various data items.

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

What does ACID stand for?

A

Atomic
Consistent
Isolated
Durable

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

What do we mean by atomic?

A

Either all operations of the transaction are properly reflected in the database or none are.

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

What do we mean by consistent?

A

Data must be in a consistent state before and after the transaction.

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

What do we mean by isolated?

A

Although multiple transactions may execute concurrently, each transaction must be unaware of other concurrently executing transactions.

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

What is meant by durable?

A

After a transaction completes successfully, the changes it has made to the database persist, even if there are system failures.

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

What are schedules?

A

sequences that indicate the chronological order in which instructions of concurrent transactions are executed

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

2 schedules are equivalent if:

A
  1. Involve same transactions
    2.Transactions are ordered the same
  2. Both schedules leave the db in the same final state
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Schedule S is serializable if

A

S is equivalent to some serial schedule

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

Two operations conflict if:

A
  1. Are by different transactions
  2. Are on the same object
  3. At least one of the is a write
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Two schedules are conflict equivalent iff:

A
  1. They involve the same actions of the same transactions
  2. Every pair of conflicting actions is ordered the same way
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Schedules 1 and 2 are view equivalent if:

A

Same initial reads
Same dependent reads
Same winning writes

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

A schedule is irrecoverable if…

A

a transaction Tj reads the updated value of Ti then Tj committed before Ti commits.

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

Cascadeless vs strict schedule

A

In a casacdeless schedule, the read is only permitted after commit but a write can take place before commit. In a strict schedule…no reads and no writes before Tj is committed.

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