DistillPrep
Python
GenAI
GenAI Frameworks
NLP
Deep Learning
Machine Learning
ML Libraries
Statistics
SQL
MLOps
Cloud
System Design
Blog
Learn
Practice
Test
Live Engine
Select Topic
Easy
(39)
Medium
(39)
Hard
(39)
hard
Nosql Vs SQL
Two engineers debate the CAP theorem. Engineer A says "PostgreSQL is a CA database — it's consistent and available." Engineer B says "CA databases don't really exist in a distributed context." Who is right and why?
A
Engineer A is right — PostgreSQL is CA because it guarantees ACID consistency and is highly available
B
Engineer B is right — CA implies tolerating zero network partitions. In reality, network partitions always eventually occur. A "CA" database must either (a) run on a single node (not distributed) or (b) choose CP or AP when a partition occurs. Calling PostgreSQL "CA" is a misapplication of CAP
C
Both are right — CAP theorem allows CA for single-region deployments
D
Neither is right — PostgreSQL is CP because it uses MVCC
Confirm Answer
Previous
Back
Next