CAP theorem Flashcards

1
Q

What does the ‘Consistency’ property in the CAP theorem ensure?

a) Data replicas are always partitioned correctly
b) All data copies are synchronized and prevent stale reads
c) Queries are always processed within a fixed latency
d) Databases operate normally even during hardware failure

A

b) All data copies are synchronized and prevent stale reads

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

What does the ‘Availability’ property in the CAP theorem measure?

a) A database’s ability to prevent data inconsistency
b) A database’s capacity to perform updates during failures
c) A database’s ability to always return data on request
d) A database’s prevention of latency spikes

A

c) A database’s ability to always return data on request

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

What does the ‘Partition Tolerance’ property ensure in distributed databases?

a) High-speed querying during network congestion
b) Data consistency during updates
c) Operations can proceed despite hardware failures
d) Low-latency data retrieval at all times

A

c) Operations can proceed despite hardware failures

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

In the CAP theorem, what is the trade-off for an AP (Availability and Partition Tolerance) system?

a) High availability but low scalability
b) Eventual consistency instead of strong consistency
c) Strong consistency but lower performance
d) Full tolerance for network failures

A

b) Eventual consistency instead of strong consistency

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

What is a characteristic of a CP (Consistency and Partition Tolerance) system?

a) Always available under all conditions
b) Maintains strong data consistency across replicas
c) Offers real-time synchronization without locks
d) Prioritizes horizontal scaling over failover mechanisms

A

b) Maintains strong data consistency across replicas

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

What type of databases are typically categorized as CA (Consistency and Availability)?

a) Distributed NoSQL systems
b) Traditional RDBMS systems
c) Systems optimized for hardware failover
d) Eventual consistency databases

A

b) Traditional RDBMS systems

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

What operational trade-off is highlighted in the CAP theorem?

a) A database cannot achieve low latency and high throughput simultaneously
b) No distributed system can guarantee Consistency, Availability, and Partition Tolerance together
c) Distributed databases cannot function with replicated data
d) High availability guarantees loss of data persistence

A

b) No distributed system can guarantee Consistency, Availability, and Partition Tolerance together

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

What is a key feature of AP systems?

a) They prioritize strong consistency and availability
b) They ensure data synchronization is immediate
c) They handle distributed queries with eventual consistency
d) They do not support partition tolerance

A

c) They handle distributed queries with eventual consistency

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

What is the role of Partition Tolerance in distributed databases?

a) Ensures low-latency read and write operations
b) Supports system functionality despite network partitions
c) Eliminates hardware dependencies for query processing
d) Guarantees strong consistency for all queries

A

b) Supports system functionality despite network partitions

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

What is an example of a CA system configuration?

a) A distributed NoSQL database with eventual consistency
b) A single-node RDBMS with strong consistency
c) A cloud-based AP system with high latency tolerance
d) A CP system designed for hardware failover

A

b) A single-node RDBMS with strong consistency

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

What happens in a CP system during network partitioning?

a) Availability is compromised to ensure data consistency
b) Data consistency is reduced to improve latency
c) Query results are delayed to preserve availability
d) Partitions are ignored to maintain performance

A

a) Availability is compromised to ensure data consistency

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

Why are distributed databases often designed as AP systems?

a) To ensure immediate consistency across replicas
b) To optimize performance under hardware failure scenarios
c) To prioritize horizontal scaling and availability
d) To reduce the impact of network partition on consistency

A

c) To prioritize horizontal scaling and availability

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

What is the significance of the CAP theorem in database design?

a) It provides a way to guarantee scalability for distributed systems
b) It guides the trade-offs between consistency, availability, and fault tolerance
c) It eliminates the need for partition tolerance in modern systems
d) It solves the latency issues in distributed database queries

A

b) It guides the trade-offs between consistency, availability, and fault tolerance

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

In a CAP visualization, where would a system focused on strong consistency and partition tolerance be located?

a) At the triangle’s base between consistency and availability
b) Along the line connecting consistency and partition tolerance
c) Between availability and partition tolerance
d) At the center of the triangle

A

b) Along the line connecting consistency and partition tolerance

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

What is one limitation of vertical scaling in traditional RDBMS systems?

a) High costs associated with adding new machines
b) Limited ability to handle large-scale distributed queries
c) Inability to utilize multiple physical nodes effectively
d) Difficulty in maintaining high availability

A

c) Inability to utilize multiple physical nodes effectively

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