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
Explain Aborted state of transaction
Aborted state, failed state nantr yete Failed [ kill ] Aborted [ Rollback ] Database before execution starts
26
Jar active state nantr transaction fail nahi zali tr kontya state made jate
Jar transaction fail nahi zali Active State nantr tr, ti partially committed state made jate
27
partially committed state cha kay meaning hoto
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
what is next step after partially committed state
5:00
29
partially committed main memory [ RAM ] me execute hota he ya primary memory me
5:20
30
After committed state which is the next state
teminated
30
jab committed state perform hogi tab kis memory ka use hoga
5:40
31
what are states of transaction write one be one
active partially committed committed failed aborted
31
committed state ka kya matlab hota he
committed state ka matlab hota he, transaction complete hone ke baad, usse primary memory ya hard disk me update kiya jata he
32
explain each state of transaction in detail
33
when partially committed state takes place
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
what if transaction has been successful,
any updates can be safely recorded and the transaction can go to the committed state
35
when does the failed state occurs
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
due to user aborting the transaction or as a result of the concurrency control protocol aborting the transaction ensures what
serializability
37
ACID properties of a transaction
Atomicity consistency Isolation Durability
38
Explain Atomicity
39
Explain Consistency
40
Explain Isolation
41
Explain Durability
42
explain architecture of database transaction
43
explain transaction manager
44
what does transaction manger do
45
what is another name of schedular
46
what does recovery manager do
47
what does buffer manager do
48
49
explain failed state
in any case if transaction cannot be proceeded further then transaction is in failed state
50
50
rollback kya hota he
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
definition of committed state
after completion of transaction, it comes in committed state