Showing posts with label Transaction Management. Show all posts
Showing posts with label Transaction Management. Show all posts

Monday, December 20, 2021

DBMS solved MCQ - Advantages of concurrent execution of multiple transactions

Multiple choices questions in DBMS, Transaction states in database, What are the advantages of concurrent execution of transactions? How do we improve the transaction throughput in RDBMS? How can we reduce the waiting time of smaller transactions?

DBMS MCQ - System crash and state of a transaction

< Previous                      

Next >

 

1. Transaction-processing systems usually allow multiple transactions to run concurrently. Which of the following best suits as the advantage(s) of allowing concurrent execution of transactions? 

a) Improved transaction throughput

b) Reduced execution complexity

c) Serializability

d) Reduced waiting time

Answer: (a) Improved transaction throughput and (d) Reduced waiting time

Improved transaction throughput - Permitting multiple transactions to execute in parallel will increase the number of transaction executed. The parallelism of the CPU and the IO system can be used to handle concurrent execution of transactions.

Reduced waiting time – the short transaction need not wait for the longer ones to complete if they are permitted to execute concurrently.

Concurrent execution reduces the unpredictable delays in running transactions. Moreover, it also reduces the average response time: the average time for a transaction to be completed after it has been submitted.

How would we improve the transaction throughput?

By permitting multiple transactions to work in parallel.

What is transaction throughput?

Number of transactions executed per second

How do we reduce waiting time of smaller transactions?

When we permit multiple transactions to work simultaneously, smaller transactions need not wait for the longer one to finish. [Smaller transactions may have to wait for longer one to finish if we permit them to execute serially, ie, one after the other]



< Previous                      

Next >


************************
Related posts:


What will happen to a transaction if a system crash has occurred during its execution?

List down the advantages of permitting multiple transactions to execute simultaneously

What is transaction throughput?

Can we permit multiple transactions to execute in parallel?

DBMS Solved MCQ, Database management system solved mcq, transaction management system solved mcq, transaction states solved mcq, transaction mcq

Friday, December 17, 2021

DBMS MCQ - System crash and the state of a transaction 2

Multiple choices questions in DBMS, Transaction states in database, What will go wrong to a transaction in case a system crash happens during its execution? Aborted, partially committed, committed and active states of transaction. What are the different possibilities that lead a transaction to fail?

DBMS MCQ - System crash and state of a transaction

< Previous                      

Next >

 

1. Consider the transaction T1 as given below; T1 enters from which of the transaction states into which other state if there is a failure after executing the instruction 7?

T1

1

2

3

4

5

6

7

8

Begin_transaction

Read(A)

A:=A-500;

Write(A);

Read(B)

B:=B+500;

Write(B);

Commit;

 

a) Active, Partially committed

b) Partially committed, Committed

c) Active, Failed

d) Partially committed, Failed

Answer: (d) Partially committed, Failed

A transaction is said to be in PARTIALLY COMMITTED state if it has successfully executed all the instructions in it.

At this point, it may be found that the transaction has stopped due to system failure and any updates made to the data items by the transaction may not have been safely recorded on secondary storage. Or the transaction might have violated serializability or an integrity constraint and the transaction has to be aborted. In such cases, the transaction would go into the FAILED state.

The transaction at FAILED state is rolled back to undo the changes made to the data items and ABORTED.

Transaction states

Active - if a transaction starts its execution it is said to be in active state

Partially committed - if a transaction successfully executed it last statement

Committed - if a transaction successfully executed commit statement.

Failed - if a transaction is not able to proceed for various reasons (refer above)

Aborted - if a transaction reached a failed state, then it will be aborted.

 



< Previous                      

Next >


************************
Related posts:


What will happen to a transaction if a system crash has occurred during its execution?

List down different situations that lead a transaction to fail

What are the possible causes that make a transaction to fail its execution?

Different states of transactions in dbms

Serializability and Concurrency control in DBMS

DBMS Solved MCQ, Database management system solved mcq, transaction management system solved mcq, transaction states solved mcq, transaction mcq

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery