Database Management Systems From SQL to NoSQL
Database Management Systems From SQL to NoSQL
• SQL (Structured Query Language) was developed by IBM in the 1970s under the name SEQUEL for querying
relational databases.
• 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.
"NoSQL" means "Not Only SQL," indicating support for alternative data
models beyond relational tables.
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.
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.
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.
Examples include:
Social Media
User profiles, posts, comments
Content Management
Storing documents, videos
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 systems are improving in this area but may lack built-in
security features depending on the provider.
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.
• SQL remains vital for structured, reliable data applications, while NoSQL
offers flexibility and scalability for modern, data-intensive applications.