api: YAML JSON TOON Database version: 1.0.0 format: json dataset: slug: cap-theorem title: CAP Theorem description: "The CAP theorem: a distributed data store can provide only two of three guarantees simultaneously." summary: "The CAP theorem's three guarantees (consistency, availability and partition tolerance) and what choosing CP or AP implies, extended with the PACELC refinement that describes the latency-versus-consistency trade-off when there is no partition." use_when[2]: You are explaining distributed-database trade-offs.,You need to check that a CAP claim about a product is stated correctly. caveats[2]: CAP applies to behavior during a partition. Saying a database 'is CP' or 'is AP' is a simplification that products often do not fit exactly.,"Consistency in CAP means linearizability, which is stricter than the 'C' in ACID." related[4]: acid-vs-base,nosql-databases-overview,newsql-distributed-sql,database-comparison category: Database Types category_slug: database-types tags: "database,cap,consistency,availability,partition" view_count: 0 entry_count: 7 fields[5]{section,field,type,example}: data,guarantee,string,Consistency data,description,string,Every read receives the most recent write or an… data,implication,string,All nodes see the same data at the same time. data,tradeoff,string,CP (Consistency + Partition Tolerance) data,examples,string,"HBase, MongoDB (in strict mode), Bigtable" data[7]: - guarantee: Consistency description: Every read receives the most recent write or an error. implication: All nodes see the same data at the same time. - guarantee: Availability description: "Every request receives a response, without guarantee that it contains the most recent write." implication: Every node remains operational. - guarantee: Partition Tolerance description: The system continues to operate despite network partitions. implication: Messages between nodes may be lost. - tradeoff: CP (Consistency + Partition Tolerance) examples: "HBase, MongoDB (in strict mode), Bigtable" description: Sacrifices availability during partitions. - tradeoff: AP (Availability + Partition Tolerance) examples: "Cassandra, DynamoDB, CouchDB" description: Sacrifices strong consistency during partitions. - guarantee: PACELC (extension) description: "If there is a Partition, choose Availability or Consistency; Else, choose Latency or Consistency." implication: Captures that replication costs latency even when the network is healthy. - guarantee: CA (single node) description: "Consistency and availability without partition tolerance, achievable only when there is no network partition to tolerate." implication: Describes a single-node or tightly coupled system rather than a distributed one.