Transaction Processing Flashcards

1
Q

what is transaction Processing

A

A mechanism for describing logical units of database processing.

Systems with large databases and hundreds of concurrent users

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

give examples of transaction processing systems (3)

A

airline reservations

banking

credit card processing

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

describe single vs multi user

A

single- only one access at one time

multi- many users accessing the database

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

what is interleaving

A

processes are interleaved to achieve the illusion of concurrency

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

what are transactions

A

executing programs

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

what is a DBMS buffer

A

In ram, contents swapped out to disk when full

using LRU

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

what is concurrency

A

several accesses at the same time are likely to allow concurrent access

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

what are the problems caused by concurrency (4)

A

lost update

unrepeatable read

dirty read/temporary update

incorrect summary

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

what is the lost update problem

A

2 transactions access the same items such that a value becomes incorrect

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

what is the dirty read/temporary update problem

A

a process will read a value when it is in a state. Then the transaction that set that will fail and it will be reverted back.
but the other process has already operated on the incorrect data

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

what is the unrepeatable read problem

A

a process will read a value and read it again and it will be different each time

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

what is the incorrect summary problem

A

one of the transactions is executing an aggregate operation on several data items, and other transactions are updating one or more of those data items. This causes a inconsistent database state

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

what risks are there to transactions

A

computer failure

physical problems

transaction error

logical error or exception

concurrency control enforcement

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

what happens if a transaction aborts

A

roll back

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

what are the transaction states

A
active
partially committed
failed
committed
aborted
terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what does it mean to say a transaction is atomic

A

it will either complete or it will not

17
Q

what are the desirable properties of a transaction (ACID)

A

atomic- either completes or doesn’t

consistency preservation- state to state

isolated- appear to work as though isolated

durability or permanency- changes made by a transaction must not be lost

18
Q

what is a schedule

A

consists of a number of transactions with an ordering of operations

19
Q

what are the 3 conditions of conflicting operations

A

one is write
different transactions
access same variable

20
Q

what is a complete schedule

A

operations are exactly T1 to N
for 2 operations in T, order in S is preserved
for 2 conflicting operations, one occurs before the other

21
Q

what is the easy approach to create a serialised schedule

A

each transaction runs after another in full

22
Q

when is a schedule serial

A

if it is equivaled to some serial schedule of the same n transactions

23
Q

how many possible serial schedules are there

A

n!

24
Q

what is result equivalence

A

if two schedules produce the same result

25
Q

what is conflict equivalence

A

the relative order of any two conflicting operations is the same

26
Q

what is non conflicting equivalence

A

when conflicting operations are applied in different orders in two schedules

27
Q

how do we graph transactions

A

have a graph for each transaction. if they conflict, draw a line from one to the other.
r(x) -> w(x)
w(x) -> r(x)
w(x) -> w(x)
if there is a cycle, the schedule is not serializable