0% found this document useful (0 votes)
3 views5 pages

CO1 - 2 Marks

NoSQL databases are non-relational systems designed for scalability and flexibility, handling various data types without fixed schemas. They are used in applications requiring real-time data processing, such as big data analytics and e-commerce. Key differences between SQL and NoSQL include structure, scalability, and data consistency, with NoSQL offering advantages like schema flexibility and horizontal scaling.

Uploaded by

sec22it187
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

CO1 - 2 Marks

NoSQL databases are non-relational systems designed for scalability and flexibility, handling various data types without fixed schemas. They are used in applications requiring real-time data processing, such as big data analytics and e-commerce. Key differences between SQL and NoSQL include structure, scalability, and data consistency, with NoSQL offering advantages like schema flexibility and horizontal scaling.

Uploaded by

sec22it187
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. What do you understand by NoSQL databases?

• NoSQL (Not Only SQL) databases are non-relational databases designed to handle
large amounts of unstructured, semi-structured, or structured data.
• They provide high scalability, flexibility, and support for distributed data storage.
• NoSQL databases do not rely on fixed schemas, making them suitable for dynamic
applications.
• They are optimized for read/write operations and can handle real-time big data
applications efficiently.
• Examples of NoSQL databases include MongoDB (document-based), Cassandra
(column-family), Redis (key-value), and Neo4j (graph-based).

2. Give the difference between Structured vs. Unstructured data.

• Structured Data:
o Organized and stored in a predefined schema such as tables.
o Uses relational databases (e.g., MySQL, PostgreSQL).
o Easily searchable using SQL queries.
• Unstructured Data:
o Lacks a predefined format (e.g., images, videos, emails).
o Cannot be stored in traditional relational databases.
o Requires NoSQL databases or data lakes for efficient processing.
• Example:
o Structured: Customer records in an SQL database.
o Unstructured: Social media posts, scanned documents.

3. State the use of NoSQL database systems.

• NoSQL databases are widely used for applications requiring high scalability and
availability.
• They are suitable for managing large-scale, distributed, and real-time data processing.
• Common use cases include:
1. Big Data Analytics: Handling vast amounts of unstructured data from IoT,
logs, and social media.
2. Content Management Systems (CMS): Storing dynamic content in
applications like blogs and news websites.
3. E-Commerce Applications: Managing large catalogs and customer
transactions.
4. Social Networks: Storing user interactions, relationships, and multimedia
data.
5. IoT and Sensor Data Storage: Storing continuous streams of sensor readings
in real-time.
4. Differentiate between SQL and NoSQL databases.

Feature SQL Databases NoSQL Databases


Structure Relational (table-based) Non-relational (key-value, document, graph)
Schema Fixed schema Dynamic schema
Scalability Vertical scaling Horizontal scaling
Data Consistency Follows ACID properties Follows BASE properties
Examples MySQL, PostgreSQL MongoDB, Cassandra, Redis

5. What are the advantages of NoSQL over traditional RDBMS?

• Scalability: NoSQL databases support horizontal scaling by distributing data across


multiple nodes.
• Flexibility: They allow schema-less data storage, making them ideal for rapidly
changing data structures.
• High Availability: Many NoSQL databases use replication and partitioning to ensure
minimal downtime.
• Better Performance for Big Data: NoSQL databases handle large volumes of data
efficiently without complex joins.
• Support for Various Data Models: They support key-value, document, column-
family, and graph-based storage, offering flexibility based on application needs.

6. Write any four benefits of NoSQL.

• Schema Flexibility: No fixed structure allows storing different types of data without
defining strict schemas.
• Scalability: Can handle large volumes of data by distributing across multiple servers.
• Fast Read/Write Operations: Optimized for high-speed performance in applications
like real-time analytics.
• Easy Integration with Cloud and Big Data Applications: Well-suited for
distributed and cloud-based storage models.
• Reduces Complexity in Data Management: Eliminates the need for complex joins
and transactions.

7. What are the pros and cons of Graph databases in NoSQL?

• Pros:
1. Ideal for complex relationships and interconnected data.
2. Provides faster query performance for relationship-based searches.
3. Flexible schema allows dynamic data updates.
• Cons:
4. High memory consumption due to node-link structures.
5. Less effective for applications requiring simple key-value storage.
8. List the different kinds of NoSQL data stores.

• Key-Value Stores: Simple key-value pairs (e.g., Redis, DynamoDB).


• Document Stores: JSON/BSON documents for semi-structured data (e.g.,
MongoDB, CouchDB).
• Column-Family Stores: Stores data in columns rather than rows (e.g., Apache
Cassandra, HBase).
• Graph Databases: Represents relationships using nodes and edges (e.g., Neo4j,
ArangoDB).
• Time-Series Databases: Optimized for time-stamped data (e.g., InfluxDB,
TimescaleDB).

9. What are the challenges of using NoSQL databases?

• Lack of Standardization: No universal query language like SQL.


• Consistency Issues: Most NoSQL databases follow BASE instead of ACID, which
may lead to eventual consistency problems.
• Data Migration Complexity: Moving from relational databases to NoSQL requires
restructuring.
• Limited Support for Complex Queries: NoSQL databases may not support joins or
multi-table transactions.
• Security Concerns: Many NoSQL databases lack built-in authentication and role-
based access control.

10. List and explain the barriers of NoSQL.

• Query Language Complexity: Different NoSQL databases use different query


mechanisms instead of a standard language like SQL.
• Consistency Trade-offs: Many NoSQL databases sacrifice consistency to achieve
high availability and partition tolerance.
• Integration Challenges: Difficult to integrate with existing SQL-based applications.
• Lack of Mature Tools: Fewer tools are available for monitoring, backup, and
performance tuning compared to traditional RDBMS.
• Developer Expertise: Requires specialized knowledge, making adoption difficult for
traditional SQL developers.
11. Explain the difference between scaling horizontally and vertically for
databases.

• Horizontal Scaling (Scaling Out):


o Adding more machines to distribute the load (e.g., sharding in MongoDB).
o Increases overall performance and fault tolerance.
• Vertical Scaling (Scaling Up):
o Increasing resources (CPU, RAM, storage) on a single server.
o Limited by hardware constraints and can become costly.
• Comparison:
o Horizontal scaling is more cost-effective for large-scale distributed
applications.
o Vertical scaling is simpler but has physical limitations.

12. Differentiate Document-oriented vs. Key-Value stores in NoSQL.

Feature Document-Oriented Key-Value Store


Data Model Stores JSON-like documents Stores simple key-value pairs
Schema Flexible Schema-less
Querying Supports complex queries Fast retrieval using keys
Use Case Content management, catalogs Caching, session management
Examples MongoDB, CouchDB Redis, DynamoDB

13. Define Eventual Consistency.

• Eventual consistency ensures that all replicas of a database will eventually converge
to the same state.
• It allows temporary inconsistencies to improve availability and partition tolerance in
distributed systems.
• Used in NoSQL databases like Cassandra and DynamoDB.
• Unlike ACID transactions, eventual consistency trades strong consistency for
performance.
• It is suitable for applications where immediate consistency is not critical, such as
social media updates.

14. Explain BASE terminology in the context of NoSQL.

• Basically Available: The system ensures high availability.


• Soft State: The system’s state may change over time due to eventual consistency.
• Eventual Consistency: Data will become consistent across nodes over time.
• BASE is the opposite of ACID in traditional databases.
• It is used in highly scalable, distributed NoSQL systems like Cassandra and
DynamoDB.
15. Explain “Polyglot Persistence” in NoSQL.

• Polyglot Persistence means using multiple databases to handle different types of data
in a system.
• It allows choosing the best database based on data structure and performance needs.
• Example: A company may use MongoDB for content management, Redis for caching,
and Neo4j for social graphs.
• This approach improves performance and scalability.
• It is widely adopted in microservices architectures.

You might also like