---
title: "NoSQL term and CAP theorem"
subject: "Big Data Technologies"
chapter: 4
key: "semester_8/big_data_technologies:nosql-term-cap-theorem"
source: https://www.bctengineer.com/q/semester_8/big_data_technologies/nosql-term-cap-theorem
site: BCT Engineering
---

# NoSQL term and CAP theorem

Big Data Technologies · Chapter 4: NoSQL

- Asked in: 2073 Magh, 3+7 marks
- Video: [Friendly Intro To the CAP Theorem (Consistency vs Availability vs Partition Tolerance)](https://www.youtube.com/watch?v=gkg-FAEXIkY) — Studying With Alex
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/big_data_technologies/nosql-term-cap-theorem
- Whole chapter: https://www.bctengineer.com/md/semester_8/big_data_technologies/chapter-4

## Question

Explain the term NO-SQL. Explain CAP theorem with suitable block diagram.

## Short answer

NoSQL ('Not Only SQL') denotes non-relational databases with flexible schemas and horizontal scaling, trading ACID for BASE. The CAP theorem states a distributed system can guarantee at most two of Consistency, Availability, and Partition Tolerance; since partitions are inevitable, systems choose between consistency (CP) and availability (AP).

## Answer

#### NoSQL

**NoSQL** stands for "Not Only SQL". It refers to a class of non-relational databases designed for large-scale, distributed data. They do not use the fixed table schema and JOINs of an RDBMS, and they relax some ACID guarantees in return for scalability and availability.

Main features:

- Schema-less / flexible schema
- Horizontal scaling over clusters of commodity servers
- High availability through replication
- Handles structured, semi-structured and unstructured data
- Eventual consistency (BASE) rather than strict ACID

Types: key-value, document, column-family and graph. Examples: MongoDB, Cassandra, HBase, Redis, Neo4j.

#### CAP theorem

The **CAP theorem** (Eric Brewer, proved by Gilbert and Lynch) states that a distributed data store can guarantee at most **two** of the following three properties at the same time:

- **Consistency (C):** all nodes see the same data at the same time; every read returns the most recent write.
- **Availability (A):** every request receives a (non-error) response, even if some nodes are down.
- **Partition tolerance (P):** the system keeps working even if the network breaks and nodes cannot communicate.

Since network partitions cannot be avoided in a distributed system, the real choice during a partition is between consistency and availability.

```text
              Consistency
                 /\
                /  \
          CA   /    \   CP
        (RDBMS)/  X  \(HBase,
              /      \ MongoDB)
             /________\
  Availability   AP    Partition
                (Cassandra,  tolerance
                 CouchDB)
```

| Combination | Meaning | Examples |
|---|---|---|
| CA | Consistent and available, but cannot tolerate partitions (single-node or tightly coupled) | Traditional RDBMS (MySQL, Oracle) |
| CP | Consistent and partition tolerant; some requests are refused during partition | HBase, MongoDB, Redis |
| AP | Available and partition tolerant; data may be temporarily stale | Cassandra, CouchDB, DynamoDB |

Example: a bank system chooses CP (never show a wrong balance, even if it has to refuse a request), while a social media feed chooses AP (it is acceptable to show slightly old posts).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does NoSQL stand for?
   A. Not Only SQL
   B. No SQL allowed
   C. Network SQL
   D. Normal SQL
   Answer: A. NoSQL means Not Only SQL: non-relational, schema-flexible, horizontally scalable databases. (Key point: Meaning of NoSQL)

2. What does the CAP theorem state?
   A. A system can guarantee all three of C, A and P
   B. A system needs only consistency
   C. A distributed store can guarantee at most two of consistency, availability and partition tolerance
   D. Partitions never occur
   Answer: C. At most two of the three can be guaranteed simultaneously. (Key point: CAP statement)

3. Since partitions cannot be avoided, what is the real choice during a partition?
   A. Between P and storage
   B. Between consistency and availability
   C. Between SQL and NoSQL
   D. Between reads and writes
   Answer: B. During a partition the system must either refuse requests (consistent) or answer with possibly stale data (available). (Key point: Real choice)

4. Which fits a bank system and which a social feed?
   A. Bank AP, feed CP
   B. Both CA
   C. Both AP
   D. Bank CP, feed AP
   Answer: D. A bank must never show a wrong balance (CP); a feed may show slightly old posts (AP). (Key point: CP vs AP)

## Related in Big Data Technologies

- [Short note: CAP theorem](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Ashort-note-cap-theorem) — Big Data Technologies, chapter 4

## Related in other subjects

- [DCS block diagram and S/H tracking/hold modes](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Adcs-block-diagram-tracking-hold) — Digital Control System, chapter 1
- [Block diagram of electric drive; series vs shunt starting](https://www.bctengineer.com/question.md?key=semester_7%2Futilization_of_electrical_energy%3Adrive-block-diagram-motor-starting) — Utilization of Electrical Energy, chapter 2
- [Frequency counter operation with block diagram](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Afrequency-counter) — Digital Logic, chapter 11, asked 14×
- [Block diagram of digital communication system](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ablock-diagram-digital-comm) — Data Communication, chapter 1, asked 8×
