ACID vs. BASE Flashcards

(13 cards)

1
Q

Explain what the two primary goals of ACID consistency are in a database?

A

ACID aims to keep data strictly correct and reliable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain what the two primary goals of BASE consistency are in a database.

A

BASE compliance aims to keep the system basically available and scalable (even at the cost of occasional inconsistencies).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the four guarantees in a system that ACID compliance supports?

A

Atomicity, consistency, isolation, and durability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In a single word, how would you describe ACID compliance?

A

Integrity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would you explain each phase of ACID compliance?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does BASE compliance it differ from ACID?

A

It’s a guarantee that prioritizes availability and partition tolerance over consistency (ACID).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the four guarantees that BASE compliance provides?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

With regard to CAP Theorem, how do BASE and ACID compliance fall?

A

BASE favors availability, where ACID favors consistency (the A and C of CAP respectively).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s the defacto use case for ACID compliance?

A

Finance and banking as they have zero tolerance for inconsistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What’s a defacto use case for BASE compliance?

A

Basically any non-critical system like a social media site where stale data or late arriving data is acceptable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In the real-world, how might you commonly implement ACID compliance?

A

Most SQL or relational databases offer ACID compliance via transactional support. It can be safe to assume that SQL is equivalent to ACID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In the real-world, how would you be most likely to support BASE compliance?

A

Most non-relational databases like Mongo, Cassandra, Redis, etc. will generally support BASE as they favor availability over consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why, at a high level, would choose ACID vs. BASE guarantees in a system?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly