Extra Flashcards

1
Q

What is a transaction in DBMS?

A

The Transaction is central to understanding how a database is kept in a complete & consistent state

Purpose of a database is to carry out transactions

transaction is a logical unit of work

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

Name 4 transaction Properties

A

Atomicity: Either executed in its entirety or not at all

Consistency: Transforms the database from one consistent state into another consistent state.

Isolation: Executes independently of other transaction

Durability: The effect of a successfully completed transaction are permanently recorded in the database and must not be lost.

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

What is concurrency Control and what does it do?

A

Concurrency control is process of managing simultaneous transactions on a database without interfering with each other

It allows more efficient use of resources

It can cause interference and data inconsistencies

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

Name 3 problems caused by concurrency

A

Lost update problem

Uncommitted dependency problem

Inconsistent analysis problem

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

What is the Serialisation principle?

A

When two transactions operate in a parallel interleaved
manner, then their effects should be the same as if they
operated in a purely serial manner.

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

Name 2 Types of locks:

A

Shared Read Lock(S-lock) -Shared reading but not writing

Exclusive Write Lock(X-lock)-
exclusive access.

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

Name the two phases of two phases locking

A

Growing Phase - Acquires all locks, but releases none

Shrinking phase - release all locks, but acquires none.

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