Considerations for oracle Transaction Processing (notes) and oracle Transaction Processing
Transaction: An Independent logical unit of work. It has a specific series of SQL statements that must be successful or failed as a whole. It is a kind of stuff that either has or has no personality.
Four attributes of a transaction: ACID, atomicity, consistency, isolation, and durability)
Atomicity: all tasks in the transaction must be executed or not executed. Some transactions do not exist.
Consistency: transactions take the database from one consistent state to another consistent state.
Isolation: the impact of a firm is unknown to other transactions before the transaction is committed.
Persistence: the modifications made by the submitted firm are permanent.
Understanding Business needs is the core of designing a good thing. Pay attention to the following rules:
1. Each logical unit of work is processed as an independent transaction and does not contain additional work.
2. Ensure that the data is consistent at the beginning of the transaction and remains consistent at the end of the transaction.
3. Use resources as needed. Resources cannot be released in transactions, which violates the ACID principle.
4. Use the save point to mark specific SQL statements suitable for rollback in the middle of the transaction.
5. transactions must be committed or rolled back explicitly. Do not rely on the default database behavior or a development tool for commit or rollback. Because the default behavior may change.