The transaction is a very small unit of a program and it may contain several low-level tasks. The transaction is in a database system must maintain Atomicity, Consistency, Isolation, and Durability − commonly known as ACID properties − in order to ensure accuracy, completeness, and data integrity.
Atomicity − It property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none. There should be no state in a database where a transaction is partially completed. That is the states should be defined before the execution of the transaction or after execution of the transaction / abortion / failure. In a transaction involving two or more discrete pieces of information, either all of the pieces are committed or none are.
Consistency − A DB (database) must remain in a consistent state after any transaction. That is No transaction should have any adverse effect on the data residing in the database. Whether the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well. A transaction either creates a new and valid state of data or, if any failure occurs, returns all data to its state before the transaction was started.
Durability − A DB (database) should be durable enough to hold all its latest updates even if the system fails or restarts. Whether a transaction updates a snippet of data in a database and commits, then the database will hold the modified data. Whether a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action. Committed data is saved by the system such that, even in the event of a failure and system restart, the data is available in its correct state.
Isolation − In the database system where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and the execution as if it's the only transaction in the system. There No any transaction will affect the existence of any other transaction. A transaction in process and not yet committed must remain isolated from any other transaction.
Anonymous User
29-Dec-2018ACID Properties
The transaction is a very small unit of a program and it may contain several low-level tasks. The transaction is in a database system must maintain Atomicity, Consistency, Isolation, and Durability − commonly known as ACID properties − in order to ensure accuracy, completeness, and data integrity.
Atomicity − It property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none. There should be no state in a database where a transaction is partially completed. That is the states should be defined before the execution of the transaction or after execution of the transaction / abortion / failure. In a transaction involving two or more discrete pieces of information, either all of the pieces are committed or none are.
Consistency − A DB (database) must remain in a consistent state after any transaction. That is No transaction should have any adverse effect on the data residing in the database. Whether the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well. A transaction either creates a new and valid state of data or, if any failure occurs, returns all data to its state before the transaction was started.
Durability − A DB (database) should be durable enough to hold all its latest updates even if the system fails or restarts. Whether a transaction updates a snippet of data in a database and commits, then the database will hold the modified data. Whether a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action. Committed data is saved by the system such that, even in the event of a failure and system restart, the data is available in its correct state.
Isolation − In the database system where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and the execution as if it's the only transaction in the system. There No any transaction will affect the existence of any other transaction. A transaction in process and not yet committed must remain isolated from any other transaction.
Thank You !!!
https://www.mindstick.com/articles/1367/transaction-in-sql-server
https://www.mindstick.com/articles/456/transaction-in-sql-server