Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
10 views

Database Management Systems From SQL to NoSQL

This presentation discusses the evolution of Database Management Systems from SQL to NoSQL, highlighting their respective strengths, weaknesses, and use cases. It explains the fundamental differences between relational and non-relational databases, including transaction management principles like ACID and BASE, and the implications of the CAP theorem. The session concludes by emphasizing the importance of selecting the right database based on specific application needs and future trends in database technology.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Database Management Systems From SQL to NoSQL

This presentation discusses the evolution of Database Management Systems from SQL to NoSQL, highlighting their respective strengths, weaknesses, and use cases. It explains the fundamental differences between relational and non-relational databases, including transaction management principles like ACID and BASE, and the implications of the CAP theorem. The session concludes by emphasizing the importance of selecting the right database based on specific application needs and future trends in database technology.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Database Management

Systems: From SQL to


NoSQL
Welcome to this presentation on Database Management Systems.
This session explores the shift from SQL to NoSQL databases,
covering fundamentals, strengths, weaknesses, and real-world
applications. Understand why NoSQL is gaining traction and how to
choose the right database for your needs Management Systems!

Presented by : Priyadarshini Muduli

Date: 3rd April, 2025


Introduction to Database Management
Systems (DBMS)
• A Database Management System (DBMS) is software
that enables the storage, retrieval, and management of
data in databases.

• It acts as a bridge between the end users and the


database, ensuring data is organized and easily
accessible.

DBMS can be classified into two main types:


• relational (SQL-based) and non-relational (NoSQL-
based). As data has grown in volume, variety, and
velocity, traditional SQL-based systems have been
supplemented by more flexible and scalable NoSQL
systems.

• This transition reflects the evolving needs of modern


applications and enterprises, especially in handling big
data and real-time processing.
History of SQL and Relational
Databases
• The concept of relational databases was introduced by Edgar F.

• Codd in 1970 through his influential paper on the relational model.

• SQL (Structured Query Language) was developed by IBM in the 1970s under the name SEQUEL for querying
relational databases.

• Oracle released the first commercial SQL-based RDBMS in 1979.

• In 1986, SQL was standardized by ANSI and later by ISO. This standardization paved the way for wide adoption
across industries.

• SQL databases became the backbone of enterprise systems, ensuring structured data handling, reliable
transactions, and consistency.
Understanding SQL Databases: Relational Model
• SQL databases are built on the relational model, which organizes data into tables composed of rows
(records) and columns (fields).

• Each table has a unique primary key to identify rows, and relationships between tables are defined using
foreign keys.

• The relational model enforces integrity constraints and supports normalization, which reduces redundancy
and improves consistency.

• This model excels in handling structured data and supports complex queries using SQL, making it ideal for
applications requiring precise data relationships and transactional reliability.
SQL Database
Advantages
 SQL databases offer several advantages: they provide strong data integrity and support for
ACID (Atomicity, Consistency, Isolation, Durability) transactions, ensuring reliable data
operations.

 Their mature ecosystem includes robust tools, widespread community support, and
compatibility with various business intelligence applications.

 SQL databases are highly secure, support complex joins, and are ideal for systems
requiring structured data and compliance with strict consistency rules.

 Their predictability and standardization make them suitable for mission-critical enterprise
applications.
SQL Database
Disadvantages
o Despite their strengths, SQL databases have limitations.

o Their fixed schemas make them less flexible in handling unstructured or evolving
data.

o Vertical scalability (upgrading a single server) is often required, which can be costly
and limited. Complex relationships and joins can become performance bottlenecks
as data scales.

o Additionally, SQL databases may not be ideal for distributed systems or real-time
applications where low latency and high throughput are essential.

o These drawbacks led to the exploration of alternative models like NoSQL.


NoSQL Databases: Introduction and
Evolution
 NoSQL databases emerged in the early 2000s to address the scalability,
performance, and flexibility needs of modern applications.

 "NoSQL" means "Not Only SQL," indicating support for alternative data
models beyond relational tables.

 NoSQL databases support various formats like JSON, key-value pairs,


columns, and graphs.

 These systems are designed for horizontal scalability, allowing data to be


distributed across multiple servers.

 They are well-suited for big data, real-time analytics, and unstructured or
semi-structured data applications.
NoSQL Databases: Beyond
Relational
NoSQL databases offer flexibility and scalability, handling unstructured or
semi-structured data efficiently, making them ideal for modern, dynamic
applications.
NoSQL databases feature schema-less design, distributed architecture, and
support multiple data models, ensuring adaptability for evolving
applications.

Document Databases Key-Value Stores


Store data as JSON-like Simple key-value pairs for fast
documents. access.

Column-family databases
Graph Databases
Enhancing performance in
Ideal for relationship-heavy data. analytics and large
datasets.
NoSQL Advantages
o NoSQL databases offer high scalability, allowing data to be
distributed across multiple nodes, enhancing availability and
performance.

o They support flexible schemas, making it easy to store and


manage unstructured or semi-structured data.

o NoSQL systems can handle massive amounts of data and are


optimized for horizontal scaling, which is cost-effective for growing
applications.

o They are ideal for agile development, real-time analytics, and


applications with dynamic data requirements.
NoSQL Disadvantages
• NoSQL databases also have challenges.

• Many lack support for ACID transactions, leading to eventual rather


than immediate consistency.

• The absence of a standardized query language makes development


less consistent across systems. Complex queries and relationships can
be harder to implement compared to SQL.

• Additionally, while flexibility is a benefit, it can also result in data


inconsistency if not managed properly.

• These trade-offs must be considered when choosing a NoSQL system.


CAP Theorem: Consistency, Availability, Partition Tolerance
• The CAP Theorem, formulated by Eric Brewer, states that a distributed system can only guarantee two of the
following three properties simultaneously: Consistency, Availability, and Partition Tolerance.
• SQL databases often prioritize consistency and availability, while NoSQL systems Favor availability and partition
tolerance.
• Understanding CAP helps architects choose the right database based on the trade-offs acceptable for a given
application.

Availability
Every request receives a (non-error) response.
2

Consistency
Every read receives the most recent write 1
or an error.

Partition Tolerance
3 System continues to operate despite network
partitions.
ACID vs. BASE: Transaction Management
• SQL databases adhere to the ACID principles, ensuring reliable transactions with strict consistency.
• ACID stands for Atomicity, Consistency, Isolation, and Durability.
• In contrast, NoSQL databases often follow BASE: Basically Available, Soft state, Eventually consistent.
• BASE allows for better performance and availability in distributed systems but may result in temporary data
inconsistencies.
• The choice between ACID and BASE depends on the application's consistency and availability needs.

ACID (SQL) BASE (NoSQL)

• Atomicity • Basically Available


• Consistency • Soft State
• Isolation • Eventually Consistent
• Durability
Use Cases for SQL Databases
SQL databases are ideal for applications requiring strong data
consistency, integrity, and complex transactions. They suit
financial systems, ERP solutions, and situations needing complex
reporting.
Examples include:

Financial Transactions Inventory Management


Banking, stock trading Tracking product levels

Customer Relationship Management (CRM)


Managing customer data
Use Cases for NoSQL
Databases
NoSQL databases excel in handling high volumes of unstructured
data and rapid iteration, ideal for social media and IoT applications.

Examples include:

Social Media
User profiles, posts, comments

Content Management
Storing documents, videos

Internet of Things (IoT)


Sensor data, device logs
Performance and Scalability
Comparison
• SQL databases scale vertically, requiring more powerful hardware,
while NoSQL databases scale horizontally by adding servers.

• NoSQL often offers better performance for large-scale, distributed


systems due to its schema flexibility and data partitioning.

• However, for smaller systems or those needing strong


consistency, SQL can outperform NoSQL.

• The best choice depends on the application’s size, access


patterns, and growth expectations.
Schema Design: SQL vs
NoSQL
• SQL databases use a rigid, predefined schema, which enforces
structure and consistency.

• This is beneficial for applications where data shape doesn't change


frequently.

• NoSQL databases, however, allow for dynamic schemas, where


fields can be added without modifying the overall structure.

• This flexibility supports rapid development and evolving data


models but requires careful management to prevent inconsistency.
The Shift Towards NoSQL:
Reasons and Benefits
NoSQL databases offer improved performance, flexibility, and cost-
effectiveness for handling diverse, big data and agile development needs.

NoSQL databases help organizations manage complex data-intensive


applications effectively.

Scalability
Handle large datasets

Flexibility
Support diverse data types

Performance
Faster read/write operations
Data Consistency and
Reliability
• SQL databases ensure strong consistency using ACID properties,
making them reliable for critical applications.

• NoSQL databases often Favor eventual consistency to improve


performance and availability in distributed setups.

• Some NoSQL systems allow tuning consistency levels to balance


performance with reliability.

• Understanding consistency requirements is key when choosing


between SQL and NoSQL.
Security and Compliance
• SQL databases offer mature security features, including role-based
access control, encryption, and support for industry compliance
standards (e.g., GDPR, HIPAA).

• NoSQL systems are improving in this area but may lack built-in
security features depending on the provider.

• When working with sensitive data, SQL may be preferred, although


managed NoSQL solutions are closing the gap.
Choosing the Right Database: Key Considerations
Selecting between SQL and NoSQL depends on several factors: data structure, consistency needs, scalability,
performance requirements, and developer familiarity. SQL suits structured, transaction-heavy apps. NoSQL excels in
flexible, high-velocity, and big data environments. Often, a hybrid approach using both types is adopted for
Considerations include:
different parts of the system.

Data Model
1 Structured or unstructured?

Consistency
2 ACID or BASE?

Scalability
3 Vertical or horizontal?
Future Trends in
Databases
• The future of databases includes hybrid and multi-model databases
that support both SQL and NoSQL features.

• Cloud-native databases are rising, offering scalability and global


availability.

• AI/ML integration with databases enables intelligent data management


and analysis.

• Technologies like NewSQL aim to combine the best of both worlds:


SQL’s consistency with NoSQL’s scalability.
Conclusion
• SQL and NoSQL databases each have strengths and limitations.

• SQL remains vital for structured, reliable data applications, while NoSQL
offers flexibility and scalability for modern, data-intensive applications.

• Understanding both models allows developers and architects to choose the


best solution for their needs or integrate both for optimal performance and
efficiency.

You might also like