DEV Community

Cover image for ACID Properties in Databases
PrincessAnjana1996
PrincessAnjana1996

Posted on

ACID Properties in Databases

A transaction is a logical unit of processing in a database management system which has one or more database access operations. If we need to do a transaction successfully, we must follow ACID compliance. ACID properties implement for the safety and privacy of the database data. For example, private data such as financial data and transaction or personal data. Also ACID properties can avoid less consistency data. For example, blog post comments. ACID stands for Atomicity, Consistency, Isolation, and Durability.

ACID Properties

Let’s see what the meaning of ACID letters,

Atomicity

Atomicity needs to do each transaction which is executed in its all, or fail without any change being concerned. For instance, I transfer 5000 rupees from my Sampath bank account to my friend’s bank account. If any of the instructions fail, the all transaction should fail and rollback.

Consistency

Consistency means if a transaction is successfully fulfilled, it will take to the database from one state that is consistent to another state that is also consistent.

Isolation

Multiple transactions can run at the same time in the system. Isolation guarantees that each transaction is not able to view partial results of the others. Executing multiple transactions in parallel must have the same results as running them sequentially.

Durability

Durability means that the result of a committed transaction is permanent, even if the database crashes immediately or in the event of a power loss.

Database files are committed every 60 seconds.
The journal of operations is committed every 100 milliseconds.
Relational databases such as MYSQL, SQL have ACID properties. Also from MongoDB 4.0 it also supports ACID for multi document transactions. Since MongoDB version 4.0, it was fast, flexible and powerful. MongoDB has revolutionized the database design, freeing the developers from some of the inconveniences of legacy relational databases. Also design of the databases based on rich, natural and flexible documents accessed by idiomatic programming language APIs, allowing developers to create app way faster than before. And MongoDB makes it easy to handle more data in distributed system architecture and allows have always-on services. So developers have a huge benefit to build powerful and sophisticated softwares in all industries.

These are some companies which use MongoDB.

some companies which use MongoDB

Original post my personal blog

Top comments (1)

Collapse
 
fridaycandours profile image
Friday candour

great post, thanks for sharing, also i think your blog is down.