NoSQL Databases – Quick Revision Notes
Types · CAP Theorem · BASE Properties · SQL vs NoSQL · Exam Facts · MCQs
What is NoSQL?
NoSQL (Not Only SQL) is a non-relational database designed to store and manage structured, semi-structured, and unstructured data. It provides high scalability, high availability, and flexible schemas.
Why NoSQL?
- Handles Big Data
- High-speed read/write
- Horizontal scaling
- Flexible schema
- Distributed architecture
- High availability
Features
- Schema-less
- Non-relational
- Horizontal scaling
- Distributed storage
- High performance
- Fault tolerant
- Replication support
Advantages
- Fast performance
- Easily scalable
- Flexible data model
- Handles huge datasets
- Suitable for cloud and IoT applications
Disadvantages
- Limited JOIN operations
- Less standardized querying
- Transaction support varies across databases
- Complex relationships can be harder to model
Types of NoSQL Databases
| Type | Description | Example |
|---|---|---|
| Key-Value | Stores data as key-value pairs | Redis, DynamoDB |
| Document | Stores JSON/BSON documents | MongoDB, CouchDB |
| Column Family | Stores data by columns | Cassandra, HBase |
| Graph | Stores nodes and relationships | Neo4j, Amazon Neptune |
SQL vs NoSQL
| SQL | NoSQL |
|---|---|
| Relational | Non-relational |
| Fixed Schema | Flexible Schema |
| Tables | Documents, Graphs, Columns, Key-Value |
| Vertical Scaling | Horizontal Scaling |
| Strong ACID support | Transaction support varies by database |
CAP Theorem
A distributed system can guarantee only two of the following:
- C – Consistency
- A – Availability
- P – Partition Tolerance
💡 Important: CAP Theorem was proposed by Eric Brewer. A distributed system can guarantee only two of the three properties.
BASE Properties
- B – Basically Available
- A – Soft State
- E – Eventually Consistent
ACID vs BASE
| ACID | BASE |
|---|---|
| Strong consistency | Eventual consistency |
| Traditional SQL databases | Common in many NoSQL databases |
| Banking systems | Distributed web applications |
Popular NoSQL Databases
| Database | Type |
|---|---|
| MongoDB | Document |
| Redis | Key-Value |
| Cassandra | Column Family |
| HBase | Column Family |
| Neo4j | Graph |
| DynamoDB | Key-Value |
Exam Facts
- NoSQL = Not Only SQL
- MongoDB → Document Database
- Redis → Key-Value Database
- Cassandra → Column Family Database
- Neo4j → Graph Database
- CAP Theorem → Eric Brewer
- BASE → Basically Available, Soft State, Eventually Consistent
One-Line Revision
- 1. NoSQL is a non-relational database.
- 2. NoSQL supports flexible schemas.
- 3. Horizontal scaling is a major advantage.
- 4. MongoDB stores JSON/BSON documents.
- 5. Redis is mainly used for caching.
- 6. Cassandra is optimized for large-scale distributed data.
- 7. Neo4j is ideal for relationship-based data.
- 8. CAP Theorem applies to distributed databases.
- 9. Many NoSQL systems prioritize availability and partition tolerance.
- 10. NoSQL is widely used in Big Data, cloud computing, IoT, and social media applications.
🎯 Conclusion
"NoSQL databases have revolutionized the way we handle large-scale, distributed data. Understanding the different types of NoSQL databases, their use cases, CAP theorem, and BASE properties is essential for GATE, Rajasthan Computer Teacher, BCI, NIELIT, and other competitive examinations. Regular revision of these concepts and practice with MCQs will help you score well in exams."
परिणाम
बहुत अच्छा!
ऊपर 'पुनः प्रयास' बटन से दोबारा प्रयास करें