ACID Compliance and CAP Theorem Flashcards

1
Q

Explain the A in ACID Compliance

A

Atomicity: The entire transaction must either succeed or fail, no in between. E.g., you can’t successfully write a portion of data and have the other portion fail

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

Explain the C in ACID Compliance

A

Consistency: All the database rules are enforced. Self-explanatory, but a part nonetheless

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

Explain the I in ACID Compliance

A

Isolation: No transaction is affected by any other transaction that is still in progress

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

Explain the D in ACID Compliance

A

Durability: Once a transaction is committed, it stays, even if the system crashes immediately after

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

What is the CAP Theorem?

A

There are three features in databases: Consistency, Availability, and Partition-Tolerance. You can pick 2, but you can’t have all 3

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

Explain the C in the CAP Theorem

A

Consistency: Every read receives the most recent write or an error

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

Explain the A in the CAP Theorem

A

Availability: Every request receives a non-error response, without the guarantee that it’s the most up-to-date

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

Explain the P in the CAP Theorem

A

Partition Tolerance: The (distributed) system continues to operate despite an arbitrary number of messages dropped/delayed by network between nodes

A “partition” in this case is a comms break within a distributed system

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

When a network failure happens, what do you do when you want to ensure consistency?

A

Cancel the operation, thus decreasing availability but ensuring consistency

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

When a network failure happens, what do you do when you want to ensure availability?

A

Proceed with the operation, thus risking inconsistency but providing availability

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

Which of the three CAP Theorem features is typically given up in modern databases?

A

Availability, since scalability and data consistency are typically more important for customers

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