unit 5+6: query processing + Transactions Mang. Flashcards

1
Q

what topics are included in this unit

A
  1. query processing problem
  2. objectives of query processing
  3. complexities of relational algebra operations
  4. characterization of query processing
  5. layers of query processing
  6. brief introduction of each layer of query processing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what happens when we run any query
what is first step

A

first query gets optimized
then query gets executed

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

when query processing is done, there are how many steps

A

there are 3 steps to query, internally

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

what are three steps of query processing

A

Query processing involves 3 basic steps
1. parsing and translation
2. optimization
3. evaluation

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

in first step of query processing, parsing. what does happen here

A
  • query’s syntax is checked, that is known as parsing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

for parsing internally one thing get created, what do we call it.

A

for parsing parsing tree is generated

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

after parsing what is next step

A

translation is next step after parsing

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

what happens in translation

A

in translation process, query is converted in relational form

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

does query gets translated in Relational Algebra from SQL query

A

yes

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

what is next step after parsing and translation

A

optimization of query is next step after parsing and translation

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

what is next step after optimization

A

evaluation of query is next step after optimization

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

draw flow chart for 3 steps of query processing

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

Example of Query processing

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

definition o ftransaction

A

action or series of actions, carried out by single user or application program, which reads or updated the contents of the database

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

is transaction logical unit of work

A

yes, transaction is logical unit of work

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

more points on transaction

A

it may be an entire or a part of program or a command (SQL for INSERT or UPDATE) and it may involve a large number of operations on a database

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

what happens after transaction is committed

A

after a transaction is committed, database reaches to a new consistent state

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

can a transaction is roll back or undone after its execution

A

yes, a transaction may be rolled back or undone after its execution

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

what is compensating transaction

A

A compensating transaction can reverse the effect of a transaction

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

what is “ state transition of a transaction “

Draw diagram

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

what is meaning of state’s of transaction

A

when program is in transaction state, from how many steps / processes it goes

this is known as state of transaction

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

Explain Active states of transaction

A

Database before execution starts

[ read or write operation ]

  1. Active state
  • pahile DB khali baslela hota, aapan read kiva write operation kel
  • mag database active state made aala
  • active state made yeun DB read kiva write operation operation perform karel
  • manje program kiva transaction, execution state made aala ahe

Active State: It is the initial state of transaction, during execution of statements, a transaction is in Active State

23
Q

Active state madun transaction kuth jate

A

Active state nantr transaction la don options astat

  1. Partially committed
  2. Failed
24
Q

Explain failed state of transaction

A

Partially committed state nantr pan Failed state yeu shekte ani Active state nantr pan failed state yeu shakte

Failed state nanter Aborted state aste, jith DB transaction la kill karto

25
Q

Explain Aborted state of transaction

A

Aborted state, failed state nantr yete

Failed

[ kill ]

Aborted

[ Rollback ]

Database before execution starts

26
Q

Jar active state nantr transaction fail nahi zali tr kontya state made jate

A

Jar transaction fail nahi zali Active State nantr tr, ti partially committed state made jate

27
Q

partially committed state cha kay meaning hoto

A

transaction la je kam karycha hot te kam transction ne compelte kel,

he partially committed state cha meaning hoto

R( A )
A = A - 700
W = ( A )
R( B )
B = B + 700
W( B ) -> till here, partially committed

Transaction la je kam krycha hot te zal complete, fakt te commit nahi kel azun

commit manje kama la save karna

28
Q

what is next step after partially committed state

A

5:00

29
Q

partially committed main memory [ RAM ] me execute hota he ya primary memory me

A

5:20

30
Q

After committed state which is the next state

A

teminated

30
Q

jab committed state perform hogi tab kis memory ka use hoga

A

5:40

31
Q

what are states of transaction
write one be one

A

active
partially committed
committed
failed
aborted

31
Q

committed state ka kya matlab hota he

A

committed state ka matlab hota he, transaction complete hone ke baad, usse primary memory ya hard disk me update kiya jata he

32
Q

explain each state of transaction in detail

A
33
Q

when partially committed state takes place

A

a transaction is partially committed if it has violated serializability or integrity constraint or secondary storage failure for record updation, then the transaction has to be aborted.

34
Q

what if transaction has been successful,

A

any updates can be safely recorded and the transaction can go to the committed state

35
Q

when does the failed state occurs

A

it occurs if the transaction can not be committed or the transaction is aborted while in the active state. perhaps due to the user aborting the transaction or as a result of the concurrency control protocol aborting the transaction to ensure the serializability

36
Q

due to user aborting the transaction or as a result of the concurrency control protocol aborting the transaction ensures what

A

serializability

37
Q

ACID properties of a transaction

A

Atomicity
consistency
Isolation
Durability

38
Q

Explain Atomicity

A
39
Q

Explain Consistency

A
40
Q

Explain Isolation

A
41
Q

Explain Durability

A
42
Q

explain architecture of database transaction

A
43
Q

explain transaction manager

A
44
Q

what does transaction manger do

A
45
Q

what is another name of schedular

A
46
Q

what does recovery manager do

A
47
Q

what does buffer manager do

A
48
Q
A
49
Q

explain failed state

A

in any case if transaction cannot be proceeded further then transaction is in failed state

50
Q
A
50
Q

rollback kya hota he

A

rollback ka matlab hota he, transaction apne initial state me aa jata he

agar wo fail ho jata h, ya koi error aa jata he

51
Q

definition of committed state

A

after completion of transaction, it comes in committed state