RDBMS struggles with scaling horizontally for big data and distributed environments.
NoSQL databases handle:
Support for schema flexibility and distributed architectures.
| Type | Description | Example Technologies |
|---|---|---|
| Document Stores | Store data as documents (JSON, BSON). Flexible schema. | MongoDB, CouchDB, Amazon DocumentDB |
| Key-Value Stores | Simple key-value pairs for fast lookups. | Redis, Riak, DynamoDB |
| Column-Family Stores | Data stored in columns rather than rows; good for analytical queries. | Apache Cassandra, HBase |
| Graph Databases | Data represented as nodes, edges for relationships. | Neo4j, Amazon Neptune, JanusGraph |
| Time-Series Databases | Optimized for time-stamped data. | InfluxDB, TimescaleDB |
| Characteristic | Explanation |
|---|---|
| Schema Flexibility | No fixed schema; can store varied data formats. |
| Scalability | Designed to scale horizontally across servers. |
| High Availability | Replication and failover built-in. |
| Eventual Consistency | Often trade strict consistency for availability and partition tolerance (CAP theorem). |
| Distributed Architecture | Data is distributed across multiple nodes. |
No distributed system can simultaneously guarantee:
NoSQL databases often choose between:
| Technology | Type | Use Case |
|---|---|---|
| MongoDB | Document Store | Content management, real-time analytics |
| Cassandra | Column Store | High write throughput, IoT data |
| Redis | Key-Value Store | Caching, session management |
| Neo4j | Graph Database | Social networks, recommendation engines |
| InfluxDB | Time-Series DB | Monitoring, sensor data |
| Aspect | RDBMS | NoSQL |
|---|---|---|
| Schema | Fixed schema | Flexible schema |
| Data Model | Tables with rows & columns | Documents, key-values, graphs |
| Transactions | Strong ACID support | Limited or eventual consistency |
| Scaling | Vertical scaling | Horizontal scaling |
| Query Language | SQL | Varies (e.g., JSON queries, Cypher) |
Open this section to load past papers