What is a transaction? Transactional critical in its atomicity. The concept of atomicity means that some things can be viewed as a unit of execution. Viewed from a database perspective. He refers to the smallest combination of one or more statements that should be executed all or not. When working with data, it is often ensured that something else happens. Or two things don't happen. It may actually reach a level of dozens of or more things that have to happen together or never happen. Take a look at a classic case. In this case, every major book is about business. You go to a bank to transfer money to a friend. Turned 100 dollars SQL is as follows: Your account has deducted 100 yuan, your friend account number adds 100 yuan. It looks perfect. In fact, there is a bug, your account has been deducted 100 yuan in the execution of your friend account plus 100 yuan, the data errors, did not add in.
Acid Transactions
If your system is designed to use acid transactions, the above situation does not occur. Acid Transactions
1. Atomicity: The transaction will be fully executed or not executed at all.
2. Consistency: All constraints and other database integrity rules need to be followed, and all related objects (data and index pages) are completely updated
3. Isolation: Every transaction is completely isolated from any other transaction. A transactional action is not disturbed by other transactional actions.
4. Persistence: After a transaction is completed, its effect is permanently stored inside the system. The data is "safe". This means that it does not occur in the event of a power outage or a system failure or a device failure that does not cause data to be written half.
Those things about the business