Explain what the two primary goals of ACID consistency are in a database?
ACID aims to keep data strictly correct and reliable.
Explain what the two primary goals of BASE consistency are in a database.
BASE compliance aims to keep the system basically available and scalable (even at the cost of occasional inconsistencies).
What are the four guarantees in a system that ACID compliance supports?
Atomicity, consistency, isolation, and durability.
In a single word, how would you describe ACID compliance?
Integrity
How would you explain each phase of ACID compliance?
Atomicity indicates an all-or-nothing operation, it either succeeds or fails, and will rollback if any step in the transaction fails.
Consistency indicates there will be a valid state, before and after the transaction.
Isolation indicates that no transaction should interfere with another. A previous operation, due to ACID rules, will always use the latest consistent state before another is executed.
Durability indicates any completed operations are written to stable, consistent storage so that any unforeseen issues would not impact the consistently or correctness of the system.
How does BASE compliance it differ from ACID?
It’s a guarantee that prioritizes availability and partition tolerance over consistency (ACID).
What are the four guarantees that BASE compliance provides?
Basically Available indicates the system will always response quickly, even under heavy load.
Soft State indicates that the state of data in the system will vary over time, even without input, since updates propagate over time.
Eventually Consistent indicates even though the system at any given point may not be consistent, it will be over time (it will converge in the end).
With regard to CAP Theorem, how do BASE and ACID compliance fall?
BASE favors availability, where ACID favors consistency (the A and C of CAP respectively).
What’s the defacto use case for ACID compliance?
Finance and banking as they have zero tolerance for inconsistency.
What’s a defacto use case for BASE compliance?
Basically any non-critical system like a social media site where stale data or late arriving data is acceptable.
In the real-world, how might you commonly implement ACID compliance?
Most SQL or relational databases offer ACID compliance via transactional support. It can be safe to assume that SQL is equivalent to ACID.
In the real-world, how would you be most likely to support BASE compliance?
Most non-relational databases like Mongo, Cassandra, Redis, etc. will generally support BASE as they favor availability over consistency.
Why, at a high level, would choose ACID vs. BASE guarantees in a system?
ACID cannot tolerate inconsistency; BASE can tolerate inconsistency.
If you cannot tolerate any inconsistency, or are working with critical data, you would likely consider ACID via a relational data store. If you have less critical data or can tolerance inconsistency, OR require hard performance and scaling guarantees, BASE compliance, likely through a non-relational database would be preferred.