SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 
Rithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdfRithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdfrahulyadav957181
 
Decoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis ProjectDecoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis ProjectBoston Institute of Analytics
 
Cyber awareness ppt on the recorded data
Cyber awareness ppt on the recorded dataCyber awareness ppt on the recorded data
Cyber awareness ppt on the recorded dataTecnoIncentive
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
Networking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxNetworking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxHimangsuNath
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Boston Institute of Analytics
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...Jack Cole
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxaleedritatuxx
 
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelDecoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelBoston Institute of Analytics
 
What To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxWhat To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxSimranPal17
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBoston Institute of Analytics
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxHaritikaChhatwal1
 
Principles and Practices of Data Visualization
Principles and Practices of Data VisualizationPrinciples and Practices of Data Visualization
Principles and Practices of Data VisualizationKianJazayeri1
 
IBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaIBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaManalVerma4
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxTasha Penwell
 

Dernier (20)

NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 
Rithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdfRithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdf
 
Decoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis ProjectDecoding Patterns: Customer Churn Prediction Data Analysis Project
Decoding Patterns: Customer Churn Prediction Data Analysis Project
 
Cyber awareness ppt on the recorded data
Cyber awareness ppt on the recorded dataCyber awareness ppt on the recorded data
Cyber awareness ppt on the recorded data
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
Networking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxNetworking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptx
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
 
Insurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis ProjectInsurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis Project
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
 
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelDecoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
 
What To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxWhat To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptx
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptx
 
Principles and Practices of Data Visualization
Principles and Practices of Data VisualizationPrinciples and Practices of Data Visualization
Principles and Practices of Data Visualization
 
IBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaIBEF report on the Insurance market in India
IBEF report on the Insurance market in India
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
 

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