SlideShare a Scribd company logo
1 of 24
SQL v/s NoSQL
Data Modelling
By Garima Hasija
Senior Data Modeler
About me
{
name: “Garima Hasija”,
company: [
“Wood Mackenzie”, “Tata Consultancy Services”, “Infosys
Consulting”
],
title: “Senior Data Modeler”,
past_exp: [
“Data Modeler”, “Data Analyst”, “ETL Developer”
],
linkedin: “https://www.linkedin.com/in/garima-hasija-aa474b173/”
}
Agenda
• Some database theory
• Data Modelling in SQL databases
• ACID transactions
• Why NoSQL?
• Data Modelling in NoSQL databases
• CAP theorem
Database and
its Types
• A database is an organized collection of
data stored and accessed electronically.
Small databases can be stored on a file
system, while large databases are hosted
on computer clusters or cloud storage
• Types of databases- Relational (SQL
DBs) and Non-Relational (NoSQL DBs)
Relational Databases Non-Relational Databases
Features of Relational Databases
ACID Transactions
Atomic: All operations in a transaction will
succeed or every operation has to roll back.
Consistent : On the completion of a transaction,
the database is structurally sound.
Isolated: Any two transactions are not
interfering and appear to run sequentially.
Durable: Result of applying a transaction is
permanent even in case of a failure.
Because of ACID properties , Relational DBs are
used with applications which require high accuracy
and consistency eg Retail and Financial applications
Data Modeling in Relational Databases
Conceptual
Data Model
Logical
Data Model
Physical
Data Model
EDW
Mart
Mart
OLTP
OLTP
OLTP
OLTP
OLTP
Entity Relationship Diagram
• Relationships:
 One-to-one
 One-to-many
 Many-to-many
Traditional RDBMS is wrong?
Why NoSQL?
• Data Format- NoSQL databases support wide variety
of very large complex, semi-structured or
unstructured data.
• Performance – The schema of RDBMS is highly
normalized and requires the use of multiple joins,
which doesn’t performs well with large amount of
data.
• Scalability - Existing RDBMS solutions require scale
up, which is limited and not really scalable when
dealing with exponential growth of data.
• Availability – NoSQL databases are highly available
even in case of power failures due to implementation
of distributed systems.
• Accommodating - The schema in NoSQL databases is
not fixed and pre-defined. It depends on the user
access patterns. NoSQL databases can easily
accommodate frequent changes in data structure.
Features of Non-Relational Databases
Data Modeling in Non-Relational Databases
MongoDB- Key Concepts
• Data stored in JSON like documents
• A MongoDB Database contains collections and each collection
contains documents
• Unlike RDBMS, a pre-defined schema for a collection is optional,
hence flexible data structures.
• Maintains backup copies of the database instance
Collection Relationships using Linking or
Embedding
• Relationships:
 One-to-one
 One-to-many
 Many-to-many
Linking v/s Embedding?
• Embedding is storing the related data within a document
that is frequently accessed together. This is also called
denormalized data model.
• Linking, also known as referencing means referencing data
of one collection into another. This is also called
normalized data model.
Data Modeling in DynamoDB
• DynamoDB is a fully managed database service on AWS, that can handle complex access patterns like time
series data or even geospatial data.
• Key Concepts-
 Data model in the form of tables
 Data stored in the form of items (key-value attributes)
 Primary Key (mandatory Partition Key and optional Sort key )
 Data Types- Scalar (number, string etc.) & Multi-valued (sets)
Example
Item
CAP Theorem
• Consistency - All users see the same
data at the same time.
• Availability – The system is going to
respond to every incoming request
with a success or failure.
• Partition Tolerance – The system
continues to function as expected even
in case of failure of a part of system.
Summary
• SQL- works great, isn’t
scalable for large data
• NoSQL- works great,
isn’t suitable for
everyone
• SQL + NoSQL- Optimized
solution
SQL vs NoSQL Data Modeling.pptx

More Related Content

Similar to SQL vs NoSQL Data Modeling.pptx

introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Databasenehabsairam
 
Introduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databasesIntroduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databasesShilpaKrishna6
 
Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Ahmed Rashwan
 
2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptxRushikeshChikane2
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMohan Rathour
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7abdulrahmanhelan
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Managementsameerfaizan
 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSatya Pal
 
Introduction to NoSQL database technology
Introduction to NoSQL database technologyIntroduction to NoSQL database technology
Introduction to NoSQL database technologynicolausalex722
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBAhmed Farag
 
NoSQL - Not Only SQL
NoSQL - Not Only SQLNoSQL - Not Only SQL
NoSQL - Not Only SQLEasyData
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sqlRam kumar
 

Similar to SQL vs NoSQL Data Modeling.pptx (20)

introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Database
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
Introduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databasesIntroduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databases
 
Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?
 
2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
 
No SQL
No SQLNo SQL
No SQL
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
No sql
No sqlNo sql
No sql
 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explained
 
Introduction to NoSQL database technology
Introduction to NoSQL database technologyIntroduction to NoSQL database technology
Introduction to NoSQL database technology
 
NoSQL Basics and MongDB
NoSQL Basics and  MongDBNoSQL Basics and  MongDB
NoSQL Basics and MongDB
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDB
 
NoSQL - Not Only SQL
NoSQL - Not Only SQLNoSQL - Not Only SQL
NoSQL - Not Only SQL
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
Database Technologies
Database TechnologiesDatabase Technologies
Database Technologies
 

Recently uploaded

EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 

Recently uploaded (20)

E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 

SQL vs NoSQL Data Modeling.pptx

  • 1. SQL v/s NoSQL Data Modelling By Garima Hasija Senior Data Modeler
  • 2. About me { name: “Garima Hasija”, company: [ “Wood Mackenzie”, “Tata Consultancy Services”, “Infosys Consulting” ], title: “Senior Data Modeler”, past_exp: [ “Data Modeler”, “Data Analyst”, “ETL Developer” ], linkedin: “https://www.linkedin.com/in/garima-hasija-aa474b173/” }
  • 3. Agenda • Some database theory • Data Modelling in SQL databases • ACID transactions • Why NoSQL? • Data Modelling in NoSQL databases • CAP theorem
  • 4. Database and its Types • A database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage • Types of databases- Relational (SQL DBs) and Non-Relational (NoSQL DBs) Relational Databases Non-Relational Databases
  • 6. ACID Transactions Atomic: All operations in a transaction will succeed or every operation has to roll back. Consistent : On the completion of a transaction, the database is structurally sound. Isolated: Any two transactions are not interfering and appear to run sequentially. Durable: Result of applying a transaction is permanent even in case of a failure. Because of ACID properties , Relational DBs are used with applications which require high accuracy and consistency eg Retail and Financial applications
  • 7. Data Modeling in Relational Databases Conceptual Data Model Logical Data Model Physical Data Model EDW Mart Mart OLTP OLTP OLTP OLTP OLTP
  • 8. Entity Relationship Diagram • Relationships:  One-to-one  One-to-many  Many-to-many
  • 10. Why NoSQL? • Data Format- NoSQL databases support wide variety of very large complex, semi-structured or unstructured data. • Performance – The schema of RDBMS is highly normalized and requires the use of multiple joins, which doesn’t performs well with large amount of data. • Scalability - Existing RDBMS solutions require scale up, which is limited and not really scalable when dealing with exponential growth of data. • Availability – NoSQL databases are highly available even in case of power failures due to implementation of distributed systems. • Accommodating - The schema in NoSQL databases is not fixed and pre-defined. It depends on the user access patterns. NoSQL databases can easily accommodate frequent changes in data structure.
  • 12. Data Modeling in Non-Relational Databases
  • 13. MongoDB- Key Concepts • Data stored in JSON like documents • A MongoDB Database contains collections and each collection contains documents • Unlike RDBMS, a pre-defined schema for a collection is optional, hence flexible data structures. • Maintains backup copies of the database instance
  • 14. Collection Relationships using Linking or Embedding • Relationships:  One-to-one  One-to-many  Many-to-many
  • 15.
  • 16.
  • 17.
  • 18. Linking v/s Embedding? • Embedding is storing the related data within a document that is frequently accessed together. This is also called denormalized data model. • Linking, also known as referencing means referencing data of one collection into another. This is also called normalized data model.
  • 19. Data Modeling in DynamoDB • DynamoDB is a fully managed database service on AWS, that can handle complex access patterns like time series data or even geospatial data. • Key Concepts-  Data model in the form of tables  Data stored in the form of items (key-value attributes)  Primary Key (mandatory Partition Key and optional Sort key )  Data Types- Scalar (number, string etc.) & Multi-valued (sets)
  • 21. CAP Theorem • Consistency - All users see the same data at the same time. • Availability – The system is going to respond to every incoming request with a success or failure. • Partition Tolerance – The system continues to function as expected even in case of failure of a part of system.
  • 22.
  • 23. Summary • SQL- works great, isn’t scalable for large data • NoSQL- works great, isn’t suitable for everyone • SQL + NoSQL- Optimized solution