unit 5+6: query processing + Transactions Mang. Flashcards
what topics are included in this unit
- query processing problem
- objectives of query processing
- complexities of relational algebra operations
- characterization of query processing
- layers of query processing
- brief introduction of each layer of query processing
what happens when we run any query
what is first step
first query gets optimized
then query gets executed
when query processing is done, there are how many steps
there are 3 steps to query, internally
what are three steps of query processing
Query processing involves 3 basic steps
1. parsing and translation
2. optimization
3. evaluation
in first step of query processing, parsing. what does happen here
- query’s syntax is checked, that is known as parsing
for parsing internally one thing get created, what do we call it.
for parsing parsing tree is generated
after parsing what is next step
translation is next step after parsing
what happens in translation
in translation process, query is converted in relational form
does query gets translated in Relational Algebra from SQL query
yes
what is next step after parsing and translation
optimization of query is next step after parsing and translation
what is next step after optimization
evaluation of query is next step after optimization
draw flow chart for 3 steps of query processing
Example of Query processing
definition o ftransaction
action or series of actions, carried out by single user or application program, which reads or updated the contents of the database
is transaction logical unit of work
yes, transaction is logical unit of work
more points on transaction
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
what happens after transaction is committed
after a transaction is committed, database reaches to a new consistent state
can a transaction is roll back or undone after its execution
yes, a transaction may be rolled back or undone after its execution
what is compensating transaction
A compensating transaction can reverse the effect of a transaction
what is “ state transition of a transaction “
Draw diagram
what is meaning of state’s of transaction
when program is in transaction state, from how many steps / processes it goes
this is known as state of transaction