Consistency is the responsibility of the application

Last Updated on Jan 21, 2021

ACID is a set of properties of database transactions that represent precise terminology for guarantees provided by the database.

But that is not entirely true. Atomicity, Isolation, and Durability are guarantees that the database can give, but Consistency is the application's responsibility.

The application alone understands what it means for data to be considered valid. These rules for data validity are designed as invariants of the application, and they are to be kept valid at all times.

Aggregates in Domain-Driven Design (DDD) act as these data consistency boundaries. All writes as part of an Aggregate update- irrespective of the number of database tables, rows, or values affected - are part of the same transaction.

© 2022 Ambitious Systems. All Rights Reserved.