# CAP Theorem

> Explain the CAP theorem. Why do people say you must choose between CP and AP, and what does that mean for real databases?

Canonical: https://www.internhack.in/learn/interview/database-design/db-nosql-cap-theorem
Last updated: 2026-11-28

Difficulty: Advanced

## Question

Explain the CAP theorem. Why do people say you must choose between CP and AP, and what does that mean for real databases?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Consistency, Availability, Partition Tolerance, PACELC, Linearizability, Quorum

Previous: [Indexing Deep Dive](https://www.internhack.in/learn/interview/database-design/db-indexing-types) · Next: [SQL vs. NoSQL](https://www.internhack.in/learn/interview/database-design/db-sql-vs-nosql-choice) · [All of Database Design](https://www.internhack.in/learn/interview/database-design)

## More Database Design questions

- [Isolation Levels](https://www.internhack.in/learn/interview/database-design/db-transaction-isolation-levels)
- [Database Sharding](https://www.internhack.in/learn/interview/database-design/db-sharding-patterns)
- [Replication Strategies](https://www.internhack.in/learn/interview/database-design/db-replication-master-slave)
- [Referential Integrity](https://www.internhack.in/learn/interview/database-design/db-foreign-key-constraints)
- [Composite Keys](https://www.internhack.in/learn/interview/database-design/db-composite-primary-key)
- [Stored Procedures](https://www.internhack.in/learn/interview/database-design/db-stored-procedures-pros-cons)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Database Design](https://www.internhack.in/learn/interview/database-design)
