Open topic with navigation
ACID Properties And Transactions
The ACID properties are one of the oldest and most important concepts of database theory. It sets out the requirements for the database reliability:
- Atomicity: This means that must follow an "all or nothing" rule. Each transaction is either successfully completed or in case of failure the state of the database isn't changed at all.
For example in a
bank transfer transaction there are two steps: debit and credit. If the debit
operation was successful, but the credit failed, the whole transaction should
fail and the system should remain in the initial state.
- Consistency: Consistency ensures that the database stays always in a consistent state. Each transaction takes the database from one consistent state to the next consistent state.
- Isolation: Isolation means that different operations cannot access modified data from another transaction that has not yet completed. There are different isolation-models. See "Isolation"
- Durability: This just refers to the real goal of any data store. It just means that the data should be persistently stored.
db4o fulfills the ACID properties. Each object container has its own transaction. Each transaction is a unit of work and ensures the ACID properties. This means, that a db4o transaction is an atomic operation. Either all changes of the db4o transactions are committed and made persistent. Or in case of a failure or rollback no state is changed. The database is kept consistent even on application or database crashes. And the db4o transactions are isolated from each other. See "db4o Transactions"