seniorSQL

What is CAP theorem?

Updated May 17, 2026

Short answer

CAP theorem states a distributed system can only guarantee two of Consistency, Availability, and Partition Tolerance.

Deep explanation

In the presence of network partitions, systems must choose between consistency and availability. CP systems prioritize correctness, AP systems prioritize uptime, and CA is only possible in non-distributed systems.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More SQL interview questions

View all →