ACID and CAP theorem, both have C standing for “Consistency”, but they do not mean the same ⚡
In the context of ACID, consistency refers to the requirement that a transaction must bring the database from one valid state to another while preserving the consistency of the data.
Relational databases provide necessary tools to ensure that, for example, constraints and triggers; and ensuring that data is not becoming “inconsistent” regardless of any failures at any time.
In the context of the CAP theorem, consistency refers to the requirement that all nodes in a distributed system see the same data at the same time. It defines the system’s ability to provide a consistent view of the data, either immediate or eventual.
I hope this clears up confusion, if any.
I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along.