DBMS Topics
NoSQL Database
Last Updated : 21 May, 2026
NoSQL "Not Only SQL" databases are non-relational database systems designed for large-scale data storage and real-time web applications. They provide flexible schemas, ho
What is NoSQL?
NoSQL ("Not Only SQL") databases are non-relational database systems designed for large-scale data storage and real-time web applications. They provide flexible schemas, horizontal scalability, and high availability — trading some ACID guarantees for performance and scale.
Why NoSQL?
| 1. SCALE | Internet-scale apps have billions of records. |
| 2. SCHEMA FLEXIBILITY | Modern apps have rapidly changing data models. |
| Altering a table schema on a billion-row table | hours of downtime. |
| 3. DATA VARIETY | Not all data is tabular. |
| 4. SPEED | Some use cases need microsecond response times. |
| Redis (in-memory key-value) | sub-millisecond reads. |
Types of NoSQL Databases
1. Key-Value Stores
Simplest model: key → value (like a hash map).
| "user:1001" | { name:"Alice", age:25, city:"Delhi" } |
| "session:abc123" | { expires:1700000000, user_id:1001 } |
| Use cases | Caching, session management, user profiles |
| Examples | Redis, Amazon DynamoDB, Memcached |
| Operations | GET(key), SET(key, value), DELETE(key) |
| Strength | O(1) lookup speed |
| Weakness | Cannot query by value; no relationships |
2. Document Stores
Stores data as self-describing documents (JSON, BSON, XML).
| "_id" | "E001", |
| "name" | "Alice", |
| "dept" | "Computer Science", |
| "skills" | ["Java", "Python", "SQL"], |
| "address" | { |
| "street" | "12 MG Road", |
| "city" | "Delhi" |
| Use cases | Content management, catalogs, user data |
| Examples | MongoDB, CouchDB, Firestore |
| Strength | Flexible schema; nested data; rich queries |
| Weakness | No cross-document joins (aggregations are complex) |
3. Column-Family (Wide Column) Stores
Stores data in rows but groups columns into column families. Optimized for querying large amounts of data on few columns.
| Row Key | "E001" |
| Column Family: PersonalInfo | { Name:"Alice", DOB:"1990-01-15" } |
| Column Family: JobInfo | { Dept:"CS", Salary:75000, Join:"2020" } |
| Use cases | Time-series, IoT, analytics, recommendation engines |
| Examples | Apache Cassandra, HBase, Google Bigtable |
| Strength | Excellent write throughput; flexible columns per row |
| Weakness | Complex query model; no ad-hoc queries easily |
4. Graph Databases
Stores data as nodes (entities) and edges (relationships).
| Nodes | Alice, Bob, CS_Dept, Project_X |
| Edges: Alice | works_in → CS_Dept |
| Alice | collaborates_with → Bob |
| Bob | assigned_to → Project_X |
| Use cases | Social networks, fraud detection, knowledge graphs |
| Examples | Neo4j, Amazon Neptune, JanusGraph |
| Strength | Traversing relationships is O(1) per hop (vs joins) |
| Weakness | Not suitable for tabular/aggregate queries |
SQL vs NoSQL Summary
| Feature | SQL (RDBMS) | NoSQL |
|---|---|---|
| Schema | Fixed, rigid | Flexible, dynamic |
| Data model | Tables/rows | JSON/graph/KV/column |
| ACID | Full | Eventual consistency |
| Scaling | Vertical | Horizontal |
| Query language | SQL (standard) | API / custom query |
| Joins | Excellent | Limited/none |
| Transactions | Full ACID | Limited (improving) |
| Maturity | 50+ years | 10–15 years |
| Best for | Structured, | Large-scale, |
| relational data | flexible data |
BASE Properties (NoSQL Consistency Model)
When to Choose SQL vs NoSQL
Use RDBMS (SQL) when
✓ Data has clear relational structure
✓ Complex queries, joins, aggregations
✓ Strong ACID compliance required (banking, finance)
✓ Data schema is well-defined and stable
✓ Team is familiar with SQL
Use NoSQL when
✓ Massive scale (millions of writes/second)
✓ Schema evolves frequently
✓ Data is hierarchical/graph/document-oriented
✓ Geographical distribution and high availability required
✓ Real-time applications (gaming, social media, IoT)
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for NoSQL Database.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this DBMS topic.
Search Terms
dbms, database management system, database notes, sql, unit, nosql, database, nosql database
Related DBMS Topics