What Is Transaction? What Are The Properties Of Transaction?
Transaction is one of the most commonly used word in our daily lives. We are consistency doing some kind of transactions everyday.
It can be done with anything. It’s just one kind of process of doing with many thing. It isn’t anything specific.
Let us look what Transaction exactly is logically and practically too…
What Is Transaction?
A Transaction is an action, or a series of actions, carried out by a single user or an application program, which reads or updates the contents of a database.
I think you are bit nervous by looking at this definition. Let me make it simple for you
Let us suppose you have bunch of files in your locker or on your table. If you came then added new file in that bunch, or removed any file from that. or you just read that file. Whatever you did there is an transaction.
I hope this is clear to you now.
Transaction is a logical unit of work on the database. Each and every transaction does something the database given.
Transactions are the unit of recovery , consistency and integrity.
There is one ACID Property of Transaction which describes all the characteristics of the Transaction.
ACID Property Of Transaction
ACID Property stands for Atomicity, Consistency, Isolation and Durability in the transaction. We are going to discuss all of them here now.
This is very identical and important property to perform the successful transaction. This states that every transaction is atomic. And they don’t have any parts. It does mean that, no transaction can be executed partially.
Either the transaction will occur full or it will not occur.
This property insures to keep all the data in the database updated. This property states that, every transaction should take the database from one consistent state into another. The database will not be consistent only at one time, which is while transaction is actually going on.
It will keep database updated.
By this property, the effect of a transaction are not visible to other transactions until it has been completed successfully without any failure.
From the outside, either you will see transaction is happened or it is not
This is actually like consequence of atomicity.
This is the most important property in terms of backup of the data. Once the transaction has been completed, it’s changes are made permanent. Even if the system crashes, the effect of a transaction will remain forever.
That’s it for those all properties of transaction which ensures that, the transaction has completed successfully.
Let us have look at the example of the ACID Property of the Transaction to understand it in the better way.
Example Of Transaction
Transaction is basically an activity done on database. You have learned that to perform successful transaction. It should ensure that ACID Property has been followed.
Thank you so much for reading. If you have anything to say, you can put it in the comment box below 😉 or you can also contact us using Contact Us Page