CAP Theorem and Database Trade-offs

Description

This quiz focuses on the CAP theorem and database trade-offs, covering MongoDB and Cassandra's approaches to consistency, availability, and partition tolerance. It emphasizes understanding system requirements to make informed database choices in design scenarios.
Eladio Rocha
Quiz by Eladio Rocha, updated 16 days ago
Eladio Rocha
Created by Eladio Rocha 16 days ago
2
0

Resource summary

Question 1

Question
What aspect of the CAP theorem does MongoDB trade off?
Answer
  • Consistency
  • Availability
  • Partition tolerance
  • Scalability

Question 2

Question
Why does MongoDB experience a brief period of downtime during server failure?
Answer
  • The entire database must reboot.
  • Data replication halts temporarily.
  • The system must detect the outage and elect a new primary host.
  • Config servers need to reinitialize.

Question 3

Question
Which part of the CAP theorem does Cassandra sacrifice?
Answer
  • Consistency
  • Availability
  • Partition tolerance
  • Fault tolerance

Question 4

Question
Why is Cassandra highly available?
Answer
  • It replicates data across all nodes in real time.
  • It avoids having a single master node.
  • It requires all nodes to stay online simultaneously.
  • It partitions data only when a node fails.

Question 5

Question
When designing a database system, what is a critical first step in choosing a database technology?
Answer
  • Picking the most popular database solution.
  • Ensuring consistency at all costs.
  • Understanding the system’s specific requirements.
  • Using a database that maximizes partition tolerance.

Question 6

Question
In what scenario is it acceptable to choose a database that sacrifices availability?
Answer
  • When downtime longer than a few minutes is acceptable.
  • When the system requires eventual consistency.
  • When a few seconds of downtime is acceptable.
  • When the system does not need to scale horizontally.

Question 7

Question
Which database technologies are examples of solutions that balance CAP trade-offs effectively for general-purpose use?
Answer
  • Cassandra and PostgreSQL
  • MongoDB and DynamoDB
  • Oracle and SQLite
  • Redis and MySQL

Question 8

Question
Why is it important to discuss database trade-offs in system design interviews?
Answer
  • It shows familiarity with coding techniques.
  • It demonstrates an understanding of scalability tools.
  • It highlights an ability to make informed technical decisions.
  • It ensures the interviewer agrees with your database choice.
Show full summary Hide full summary

Similar

ACID Compliance and CAP Theorem
Eladio Rocha
liderazgo
ROuz De La ROza
conflicto y negacion
ROuz De La ROza
Introducción a MongoDB
Jose Julian Ariza V.
Scalable Systems and Database Redundancy
Eladio Rocha
Scaling Systems from Zero to Millions of Users
Eladio Rocha
comportamiento grupal
ROuz De La ROza
Data Lakes and Big Data Systems
Eladio Rocha
Modern Scalable Databases
Eladio Rocha
Scalable System Architectures
Eladio Rocha