1) Write A Short Note On Nosql
1) Write A Short Note On Nosql
NoSQL (Not Only SQL) is a database management system that does not follow the
traditional relational database structure. It offers flexible schema design, scalability, and high
performance, making it suitable for handling unstructured and semi-structured data. NoSQL
databases are primarily used in big data applications, real-time web apps, and distributed
systems.
Key Features:
Schema-less
High scalability
Supports unstructured, semi-structured, and structured data
Often open-source
Suitable for distributed architectures
Explanation:
High scalability
Flexible data model
Better performance for large volumes of data
Easily handles big data and real-time web apps
Disadvantages:
Lack of standardization
Limited support for complex queries
No support for multi-row transactions in many cases
Requires more development effort to maintain consistency
BASE is an alternative to the ACID model in traditional databases and is more suitable for
distributed systems.
High availability
Horizontal scalability
Flexible schema
Handling large volumes of data
Key Features:
Schema-free design
Fast read/write operations
Supports big data and real-time apps
Optimized for distributed computing
Features:
Schema-less
Horizontal scalability
High availability
Support for distributed architecture
b) Column-Based Database:
c) Graph-Based Database:
Unit 2
Refers to the rate at which a database can process read and write operations. MongoDB provides
faster operations due to in-memory computing, indexing, and document-based storage.
b) Scalability:
Ability of a system to handle a growing amount of data and requests. MongoDB achieves this via
sharding (horizontal scaling), where data is split across multiple servers.
c) Agility:
Characteristics:
No fixed schema
Suited for large-scale data storage
Enables rapid development
Flexible data types and structures
Ideal for unstructured or semi-structured data
4) Explain JSON-Based Document and Its Advantages
JSON Document:
JavaScript Object Notation (JSON) is a lightweight data-interchange format that uses key-value pairs.
In MongoDB:
Advantages:
Human-readable format
Easy to map with application-level data structures
Supports nested documents and arrays
Schema flexibility for fast iteration
Ideal for web and mobile applications
Trade-off May reduce features for speed May slow down performance with more logic
On-premises
In cloud environments (AWS, Azure, GCP)
As a managed service (MongoDB Atlas)
On containers (Docker)
On serverless platforms
This “run anywhere” capability gives developers the freedom to choose their preferred environment
without changing the codebase.
Features:
Polymorphic Schema:
Example:
json
CopyEdit
{ "_id": 1, "type": "book", "title": "Mongo Basics" }
{ "_id": 2, "type": "video", "title": "MongoDB Crash Course", "duration":
120 }
Each document is shaped differently based on its type, yet stored in the same collection.