SQL Vs Nosql
SQL Vs Nosql
Understanding
When To Use
SQL vs NoSQL
in Analytics
Tools used :
Feature Description
Structured
Relational tables allow for easy querying, joining, and aggregating.
Data
ACID Ensures data consistency, which is crucial for accurate analytics and
Compliance reporting.
Mature Extensive tooling and support for ETL (Extract, Transform, Load),
Ecosystem reporting, and data warehousing.
Data Analytics 2024 SQL vs NoSQL
Tools used :
Feature Description
Unstructured NoSQL handles diverse data formats like JSON, making it suitable
Data for semi-structured or unstructured data.
Horizontal Easily scales out across multiple servers, making it ideal for big data
Scalability and high-velocity analytics.
SQL vs NoSQL
in Data Analytics
Feature SQL NoSQL
Data Volume Suitable for structured data with Ideal for large-scale, unstructured, or
moderate volume semi-structured data
Use Cases Data warehouses, business Big data analytics, real-time insights,
intelligence, transactional distributed data systems
reporting
Data Analytics 2024 SQL vs NoSQL
SQL Example
You start a small online store selling electronics. You need to
manage
Inventor
Customer details
Orders efficiently
You choose a SQL database, like MySQL, because your data is
highly structured and relational.
SQL Structure
Products Table
Product_ID ProductName Price Category
Customers Table
Customer_ID Name Email Address
Orders Table
OrderID CustomerID ProductID OrderDate
Orders Table
OrderID CustomerID ProductID OrderDate
Customers Table
P.S : You can easily write complex queries like, “Show all orders placed
NoSQL Example
Personalized recommendation
NoSQL Structure
Example Document
"CustomerID": "001",
"Email": "[email protected]",
"Orders": [
],
"Reviews": [
],
"Wishlist": [
}
Data Analytics 2024 SQL vs NoSQL
"CustomerID": "001",
"CustomerID": "001",
"Email": "[email protected]",
"Email": "[email protected]",
"Orders": [
"Orders": [
{
{
"OrderID": "5001",
"OrderID": "5001",
"ProductID": "101",
"ProductID": "101",
"ProductName": "Smartphone",
"ProductName": "Smartphone",
"OrderDate": "2024-08-21"
"OrderDate": "2024-08-21"
}
}
],
],
"Reviews": [],
"Reviews": [
"Wishlist": []
{
} "ProductID": "101",
"Rating": 5,
],
"Wishlist": [
"ProductID": "102",
wishlist items.
"Price": "$999"
db.customers.findOne(
]
{ "CustomerID": "001" },
} John Doe writes a review
{ "Reviews": 1, "Wishlist": 1 }
for the smartphone he
) purchased and adds a new
product to his wishlist.
Data Analytics 2024 SQL vs NoSQL