🚀 Think you’ve got what it takes for a career in Data? Find out in just one minute!

ACID: All about this important concept in Database Management

-
3
 m de lecture
-
ACID

The ACID (Atomicity, Consistency, Isolation, Durability) approach ensures the integrity of data within a database. Find out everything you need to know about this concept.

Big Data offers many opportunities. However, to process the huge volume of Data generated every day, it is necessary to use databases.

A database is a set of data, structured or not, stored on computers. In the age of Big Data, these databases often rely on server farms specially designed for this purpose: Data Centers. These architectures are complex, and DataBase Management Systems (DBMS) are used to handle them. These systems allow the management of the storage and retrieval of data within the databases.

So, how to manage databases and their contents in an optimal way? One of the most commonly used methods is the ACID approach.

What does "ACID" means?

In computing, ACID is an acronym for Atomicity, Consistency, Isolation, and Durability.

These four principles ensure that database transactions are processed reliably. As a reminder, the term “transaction” refers to any operation performed within a database. For example, a transaction can be the creation of a new record or an update of data.

Any change made to a database must be done very carefully. Otherwise, the data may be corrupted.

By applying ACID properties to every change made to a database, it is easier to maintain its accuracy and reliability. Now let’s take a closer look at the four components of the ACID approach.

Atomicity

The atomicity of a database transaction means that any change made must be completed to the end. If there is an interruption, for example, a loss of connection in the middle of an operation, the change must be canceled and the database must automatically return to its previous state at the beginning of the transaction.

This principle prevents a transaction from being partially completed due to a failure or crash. Otherwise, it is impossible to know at what stage the process was interrupted. This can lead to major complications.

Consistency

Consistency is a principle that ensures that a transaction does not violate the data integrity constraints set for a database.

Thus, if the database enters an “illegal” state by violating these rules, the transaction process will be automatically aborted. The database will automatically return to its previous state.

Isolation

An isolated transaction is considered “serializable“. This means that the transactions occur in successive order, rather than being performed all at once.

Any write or read performed in the database does not affect the write or read of other transactions occurring in the same database. A global order is created, and each transaction is added to a queue. Only when a transaction is finished do the others start.

This does not mean that two transactions cannot occur simultaneously. Several transactions can be carried out at the same time, provided that they cannot impact each other.

Of course, this method can affect the speed of transactions. Many transactions will have to wait before they can begin.

However, this is a sacrifice to ensure security and data integrity. To achieve this isolation, it is possible to opt for an “optimistic” or “pessimistic” transaction scheme.

In the case of an optimistic transaction scheme, other transactions will be performed without reading or writing to the same location. If two transactions collide, they will automatically be dropped and retried.

A pessimistic transaction scheme leaves less freedom to the database. Resources will be limited, assuming that transactions will impact each other. This reduces the number of aborts and retries, but forces transactions to wait in the queue more often.

Sustainability

Sustainability is the fourth principle of the ACID approach. It ensures that any changes made to the database are permanent, even if the system fails.

This prevents the data from being corrupted or altered by a service failure, a crash, or any other technical problem. To ensure this durability, “changelogs” are used as references each time the database is restarted.

What are the advantages of ACID?

By complying with the four principles of the ACID approach, it is possible to ensure the security and integrity of the data within a database. In this way, they can bring their full value to the company.

Otherwise, a database with corrupted data can cause serious problems that are costly to resolve. This is especially true for the many data-driven companies that use their data on a daily basis to make decisions or guide their strategy.

How to master the ACID approach for databases?

Mastering the ACID approach is essential to properly exploit Big Data. It is a skill that is highly sought after by many companies in all sectors.

To discover all the details of this approach, and to learn how to manipulate the different types of databases, you can opt for DataScientest training courses.

Databases are at the heart of our Data Scientist, Data Analyst, and Data Engineer training courses. These different courses allow you to train for the Data Science profession.

All our programs are designed by professionals to meet the real needs of companies. These professional training courses in Blended Learning can be done in Continuing Education or BootCamp.

At the end of the course, students receive a diploma certified by the Sorbonne University. Among the alumni, 93% found a job immediately.

You know everything about the ACID approach. Discover our complete file on databases and our presentation of the SQL language.

Facebook
Twitter
LinkedIn

DataScientest News

Sign up for our Newsletter to receive our guides, tutorials, events, and the latest news directly in your inbox.

You are not available?

Leave us your e-mail, so that we can send you your new articles when they are published!
icon newsletter

DataNews

Get monthly insider insights from experts directly in your mailbox