ACID and BASE in Databases: Key Differences Explained


ACID and BASE are acronyms for different database properties, describing how the database behaves during processing a transaction,
ACID:
A: Atomicity:
it ensures that all steps or statements in a transaction are fully applied committed
, or fully reverted rolled-back
,
for example, if we have an ordering system, which has orders
table, and order_items
table, while placing an order, we want to insert the order first, them the order items, imagine that the connection lost or any error occurred after inserting the order, now we have an empty order without any items in it, this is where we will need to roll-back the order insertion, to avoid the empty order.
C: Consistency:
it ensures that the data integrity, even when we have multiple users using the system at the same time,
for example, let’s build on the example before, let’s imagine that orders
table has a column named total
, which refers to the total amount of the order, and order_items
table has a column named price
, the value of orders.total
should be exactly sum(order_items.price
.
I: Isolation:
it ensures that any new transaction should wait for other transactions which are working on the same records to finish, to make sure that concurrent transactions don’t interfere with each other,
for example, let’s continue building on the same example, imagine a user is order the last item of a specific product, and at the same time another one is trying to buy the same product, the second transaction should wait for the first one to finish so it can proceed.
D: Durability:
it ensures that once a transaction is committed to the database, it will never get lost, even if the system experienced failure or anything,
for example, in the same ordering system, once you have placed an order, it can never be lost
BASE:
BA: Basically Available:
it means that the system will always respond to requests, even if some parts of it are failing or operating with degraded performance. Instead of guaranteeing immediate consistency (like ACID), the system prioritizes availability by allowing temporary inconsistencies.
S: Soft State:
it means that the state of the data can be changed automatically, even without any external triggers or inputs, This contrasts with a strictly consistent state (like ACID), where the data is immediately consistent after each transaction.
E: Eventually consistent:
it means the system may allow temporarily inconsistent data, that will eventually converge to a consistent state after a period of time, as long as no new updates are made.
Key Differences Between ACID and BASE:
Feature | ACID | BASE |
Consistency | strict and immediate | eventual |
Availability | sacrifices availability | prioritiezes availability |
Complexity | higher | simpler |
Use Cases | finance, sensitive data… | social media, insensitive data… |
Performance | slower, due to strict rules | faster |
Subscribe to my newsletter
Read articles from Amjad AH directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Amjad AH
Amjad AH
I'm a software developer, specialised in backend development. In my free time, I enjoy playing video games and reading.