unit 7: distributed concurrency control Flashcards

1
Q

define transaction

A

A transaction can be defined as a unit or a part of program at the time of its execution,
that forms logical unit of database processing…

hamare pas bohot sari lines of cod e/ program hota he, usme se ham at a time kisi ek line ko hi to execute karenge to uss part ko ham transaction kahenge

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

can transaction includes one or more access operation on database

A

Yes, transaction can include one or more access operations on a database like, insertion, deletion, modification or retrieval operation

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

why understanding transaction’s is important

A

all things are related to transactions in this subject
thats why understanding transactions is very important

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

what are some basic database access operations

A
  1. read_item( x )
  2. write_item( x )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Is there any similarity between Transaction or Process ?

A

In DBMS, part or unit of program is known as Transaction

In OS, part or unit of program is known as Process

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

Why ACID properties are used?

A

To maintain the integrity of program we use ACID properties.

For ensuring integrity of data, database system maintain the ACID properties.

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

what is schedule?

A

whenever multiple transactions are operating, each and every transaction has to done certain set of actions, so at which instant of time, which action, under which transaction is going to get executed, that will be mapped along with time instant and that is known as schedule.

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

example

A

there are two transaction T1 and T2 in schedule

this transaction has to do 4 tasks/actions

some read write operation, it is being guided by begin_tran and commit, in this brackets this transaction is carried out

for T2 there are also some transaction

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

what is serial schedule

A

a schedule where the operations of each transaction are executed consecutively without any interleaved operations from other transaction

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

non-serial schedule

A

a schedule the operations from a set of concurrent transactions are interleaved

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

testing of serializabilty

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

concurrency control definition / understanding

A

In real life situations (applications) multiple transactions will be executed in parallel or concurrently

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

what will happen if there is no concurrency control

A

those transaction execution will leave behind database, in some inconsistent state

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

Proper definition of concurrency control

A

the concurrency control is a process of managing simultaneous operations on the database without having them interfere with one another. It enhances overall CPU utilization.

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

there are 3 potential problems of concurrency

A
  • lost update problem
  • uncommitted dependency (or dirty read) problem
  • inconsistent analysis problem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what are other words use for concurrency

A

parallelly / simultaneously / at same time

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

what / explain granularity of locks
[first concept in lock based protocols]

A

the level and type of information that the lock protects is called locking granularity

OR

in other words, the size of data item that the data manager locks is called locking granularity

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

Lost update problem Explain

A

update operation of one user is overwritten by another user

OR

If any transaction Tj updates any variable A at time t, without knowing the value of A at time t , then this may leads to lost update problem

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

example of lost update problem

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

example of lost update problem

A

user one initiated T1
user two initiated T2

T2 is older, because it got initiated at t1
T2 is younger, initiated at t2

so the updates done on balX are overwritten by T2

That is our lost update problem

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

Explain uncommitted dependency / dirty read problem

A

when a transaction uses result of partially completed transaction

OR

Reading the data value of a variable before committing may lead to ‘Dirty Read Problem’

OR

ek transaction kisi variable par kam kar raha tha, hi transaction commit honachya pahile, dusrya transaction ne hya variable cha data read kela

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

explain inconsistent analysis problem

A

when a transaction reads several values from the database but a second transaction updates some of them during the execution of the first

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

Explain locking

A
27
Q

Methods of Locking

A
28
Q

Explain shared lock

A
29
Q

explain exclusive lock

A
30
Q

Explain two phase lock / 2 PL

A
31
Q

how 2PL can be used to prevent lost update problem

A
32
Q

how to prevent uncommitted dependency problem

A
33
Q

how to prevent inconsistent analysis problem using 2Pl

A
34
Q

Explain cascading rollback problem using 2Pl

A
35
Q

granularity of data items

A

whenever multiple transactions are taking place, concurrently then there is a problem there is interference of data.

One transaction update is getting cancelled nullified by other transaction

so our data require protection, and this protection can be obtained from concurrency protocol

36
Q
A
37
Q

from this -

A

separate

38
Q

what does distributed concurrency control mechanism ensures

A

It ensures consistency of database in multi-user distributed environment

39
Q

what is mean by concurrent execution of transactions

A
40
Q

what is conflicting operations

A
41
Q

how to classify concurrency control mechanism

A
42
Q
A
43
Q
A
44
Q
A
45
Q
A
46
Q
A
47
Q
A
48
Q
A
49
Q
A
50
Q
A
51
Q
A
52
Q
A
53
Q
A
54
Q
A
55
Q
A
56
Q
A
57
Q
A
58
Q
A
59
Q
A
60
Q
A
61
Q
A
62
Q
A
63
Q
A