Eladio Rocha
Quiz by , created 16 days ago

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.

2
0
0
Eladio Rocha
Created by Eladio Rocha 16 days ago
Close

CAP Theorem and Database Trade-offs

Question 1 of 8

1

What aspect of the CAP theorem does MongoDB trade off?

Select one of the following:

  • Consistency

  • Availability

  • Partition tolerance

  • Scalability

Explanation

Question 2 of 8

1

Why does MongoDB experience a brief period of downtime during server failure?

Select one of the following:

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

Explanation

Question 3 of 8

1

Which part of the CAP theorem does Cassandra sacrifice?

Select one of the following:

  • Consistency

  • Availability

  • Partition tolerance

  • Fault tolerance

Explanation

Question 4 of 8

1

Why is Cassandra highly available?

Select one of the following:

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

Explanation

Question 5 of 8

1

When designing a database system, what is a critical first step in choosing a database technology?

Select one of the following:

  • Picking the most popular database solution.

  • Ensuring consistency at all costs.

  • Understanding the system’s specific requirements.

  • Using a database that maximizes partition tolerance.

Explanation

Question 6 of 8

1

In what scenario is it acceptable to choose a database that sacrifices availability?

Select one of the following:

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

Explanation

Question 7 of 8

1

Which database technologies are examples of solutions that balance CAP trade-offs effectively for general-purpose use?

Select one of the following:

  • Cassandra and PostgreSQL

  • MongoDB and DynamoDB

  • Oracle and SQLite

  • Redis and MySQL

Explanation

Question 8 of 8

1

Why is it important to discuss database trade-offs in system design interviews?

Select one of the following:

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

Explanation