Basics of ACID properties:
Before understanding ACID properties one should know the basic concept of a transaction.

Now coming to The ACID properties, it is a set of properties to protect database validity in all odds like the event of errors, power failures, concurrency control, etc. In other words if a sequence of database operations that satisfies the ACID properties (and these can be perceived as a single logical operation on the data) is called a transaction.
ACID is an acronym for atomicity, consistency, isolation, and durability.
Atomicity
Atomicity of a transaction means series of database operations consisting of the transaction either all occur, or nothing occurs. It prevents partial transactions to occur, which can cause greater problems in database consistency.
Consistency
Consistency rules are often enforced through constraints at a field level. A constraint specifies a rule governing a given record or field-level value. For example if there is a minimum balance requirement for a savings account then one cannot withdraw an amount which will make the balance less than the minimum balance(So here we are rejecting the request of subtracting the balance amount).
Isolation
If multiple transactions are running concurrently, they should not be affected by each other. If they affect each other in that case we can get an unpredictable result. Isolation ensures that all transactions running concurrently are running in an isolated manner. A lower isolation level increases the ability of many users to access the same data at the same time but increases the number of concurrency effects (such as dirty reads or lost updates) users might encounter. Conversely, a higher isolation level reduces the types of concurrency effects that users may encounter, but requires more system resources and increases the chances that one transaction will block another. Isolation is implemented by locking and database schedules.
0 Comments
Post a Comment