OLTP applications are applications that help in the processing and management of transactions. These applications perform data capture, data processing, retrieval, modification, and storage. However, it does not stop here. OLTP applications treat these data tasks as transactions. Transactions have a few important properties and OLTP applications adhere to these properties. These properties are grouped under the acronym ACID. Let's discuss these properties:
- Atomicity: This property states that a transaction must consist of statements and either all statements should complete successfully or no statement should be executed. If multiple statements are grouped together, these statements together form the transaction. Atomicity means each transaction is treated as the lowest single unit of execution that either completes successfully or fails.
- Consistency: This property focuses on the state of data in a database. It dictates that any change in state should be complete and based on the rules and constraints of the database, and that partial updates should not be allowed.
- Isolation: This property states that there can be multiple concurrent transactions executed on the system and each transaction should be treated in isolation. One transaction should not know about or interfere with any other transaction. If the transactions were to be executed in sequence, by the end, the state of data should be the same as before.
- Durability: This property states that the data should be persisted and available, even after failure, once it is committed to the database. A committed transaction becomes a fact.