What is Transaction - stuckmile.com

What is a Transaction ? Discuss it – Stuckmile.com

What is a Transaction ?

In Database Management system, A Transaction is a single unit of many logical operations/work. In simple words, Any logical calculations done in  a consistent mode in Database is known as Transaction. Best one example is ATM that we use on regular basis.

Example – Lets say person A is with having 300 Rs. & person B is having 200 Rs. Now person B wants to send 100 rs to person A. From the definition, Here the total unit of logical work are –

Person A with Having 300 Rs
and have supposed to receive 100 Rs from Person B
Person B with having 200 Rs and wants to transfer 100 Rs to Person A
R(A);// Reading the data of AR(B); // Reading the data of B
A= A+ 100; // Plus in total of AB= B-100; // Minus in total of B
W(A); //Writing the data of AW(B); //Writing the data of B
R(A) ; // Output comes as 400 RsR(B); // Output comes as 100 Rs.

⇒ Now, What is consistent ?

  • Consistency means the transaction will remain intact with the state prior to the transaction and later to the transaction. Like In this case, The person A  gotten what he wants and person B also satisfied with his steps.

How all the transaction in ATM goes so that much fast ?

It is a very interesting thing that we can’t able to see with our real-time working with ATM like withdrawing or querying or etc. There are lots of code there but the main system is working, called as ‘ Schedule

⇒ What is a Schedule ?

Schedule is nothing but, a combination of many transaction and determining how all the transactions can be performed. Whether the transactions can be interleaved or non-interleaved, the main focus is always to Increase the CPU utilization time by keep the CPU running while other transactions are doing I/O operations (Input-Output). Again if we take our main example, Writing & Reading the data of A or B is a I/O operation and A=A+100; is a logical work which is done by the CPU.

So, It is well clear that In ATM’s, transactions follow a speed process routine, combinations of schedules which is no doubt incredibly fast.

 

Ask your questions in the comment box, will try to answer each one and if you want more about “Transaction”, just leave your feedback.

 

 

 

 

4
YayYay
1
HeartHeart
1
PoopPoop
0
HahaHaha
0
LoveLove
0
WowWow
0
SadSad
0
AngryAngry
Voted Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.