SlideShare a Scribd company logo
SQL vs NoSQL | MySQL vs MongoDB Tutorial | Edureka
What is SQL?
WHAT is NoSQL?
SQL vs NoSQL
MySQL vs MongoDB
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
SQLisastandardlanguagewhichstandsforStructuredQueryLanguage.SQListhecoreofrelationaldatabaseandis
usedforaccessingandmanagingdatabase.
WhatisSQL?
EmpID EmpFname EmpLname
ProjectID ProjName ProjDate ClientID CFname CLname
DatabaseStructure
www.edureka.co/mysql-dba
SQLisastandardlanguagewhichstandsforStructuredQueryLanguage.SQListhecoreofrelationaldatabaseandis
usedforaccessingandmanagingdatabase.
WhatisSQL?
SELECT EmpID, EmpName FROM Employee;
SQLKeywords Parameters
SQLQuery
www.edureka.co/mysql-dba
SQLisastandardlanguagewhichstandsforStructuredQueryLanguage.SQListhecoreofrelationaldatabaseandis
usedforaccessingandmanagingdatabase.
WhatisSQL?
RelationshipsinSQL
One–One
Relationship
One–Many
Relationship
Many–Many
Relationship
www.edureka.co/mysql-dba
Self-Refencing
Relationship
www.edureka.co/mysql-dba
NoSQL,knownasNotonlySQLdatabase,providesamechanismforstorageandretrievalofdataandisthenext
generationdatabase.Ithasnospecificschemaandcanhandlehugeamountofdata.
WhatisNoSQL?
Database
Collections
Documents
Employee_Info
Employee Projects
{EmpID:1,EmpFname:‘Swatee’}
{EmpID:2,EmpFname:‘Aayushi’}
{ProjectID:1,ProjName:‘Proj1’}
{ProjectID:2,ProjName:‘Proj2’}
DatabaseStructure
www.edureka.co/mysql-dba
NoSQL,knownasNotonlySQLdatabase,providesamechanismforstorageandretrievalofdataandisthenext
generationdatabase.Ithasnospecificschemaandcanhandlehugeamountofdata.
WhatisNoSQL?
NoSpecific
Schema
NoQuery
Language
NooraFew
Relationships
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
SQL vs
NoSQL
BASE PROPERTIES
EXTERNAL SUPPORT
HIERARCHIAL DATA STORAGE
SCALABILITY
DATABASE CATEGORIES
Complex QUERIES
Type of Database
SCHEMA
LANGUAGE
ONLINE PROCESSING
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
RELATIONAL
DATABASE
NON-RELATIONAL
DATABASE
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
PRE–DEFINED
SCHEMA
DYNAMIC
SCHEMA
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
TABLEBASEDDATABASES DOCUMENTDATABASES
KEYVALUESTORES
GRAPHSTORES
WIDECOLUMNSTORES
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
GOODFOR
COMPLEXQUERIES
NOTAGOODFITFOR
COMPLEXQUERIES
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
NOTABESTFIT FITSBETTERWHENCOMPAREDTO
SQL
As it uses key-value pair way
of storing data.
As it uses tables to store
data.
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
VERTICALLYSCALABLE HORIZONTALLYSCALABLE
IncreaseRAM,CPUona
singleserver.
Addmoreserversintothe
clusterofservers.
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
HASASPECIFICLANGUAGE NOSPECIFICLANGUAGE
Doesnotvaryfromadatabase-to-
database.
Variesfromadatabase-to-database.
Structured Query Language Unstructured Query Language
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
BestFitForHeavyTransactionalType
Applications
CanBeUsedForTransactionalTypeApplications,
But,IsNotStableForHighLoadApplications.
MainlyUsedForOLAP
(OnlineAnalyticalProcessing)
MainlyUsedForOLTP
(OnlineTransactionalProcessing)
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
Atomicity
Consistency
Isolation
Durability
A
C
I
D
CAP Theorem
C
A
P
ACID Properties
Consistency
Availability
Partition Tolerance
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
ExcellentSupportisprovided
byallSQLvendors
Youhavetorelyoncommunity
support
Onlylimitedexpertsavailable.
www.edureka.co/mysql-dba
Examples
of SQL &
NoSQL
Example of NoSQL
Example of SQL
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
MySQLisanopen-sourcerelationaldatabasemanagementsystemthatworksonmanyplatforms.Itprovidesmulti-
useraccesstosupportmanystorageenginesandisbackedbyOracle.So, youcanbuyacommerciallicenseversion
fromOracletogetpremiumsupportservices.
MySQL
www.edureka.co/mysql-dba
Comprehensive
Application Development
Open Source & 24 * 7
Support
Scalability & Flexibility
High Availability High Performance
Secure Data
Protection
Ease of Management
Robust Transactional
Support
Low Total Cost Of
Ownership
MongoDBisanon-relationaldatabasewhichstoresdataasdocumentsinabinaryrepresentationcalledBSON(Binary
JSON).ThiskindofdatabasestoresrelatedinformationtogetherforfastqueryaccessthroughtheMongoDBquery
language.
MongoDB
www.edureka.co/mysql-dba
Indexing Replication Ad-hoc Queries
Schema less Sharding
MySQL vs
MongoDB
USAGE
ACTIVE COMMUNITY
PERFORMANCE
Support
RELATIONSHIPS
SECURITY
QUERY LANGUAGE
FLEXIBILITY OF SCHEMA
KEY FEATURES
REPLICATION
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
UsesUnstructuredQuery
Language
UsesStructuredQuery
Language
INSERT INTO employees (employee_id,
empage)
VALUES (‘abc001’, ‘23')
db.employees.insert({
employee_id: ‘abc001',
age: 23,
})
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
NoRestrictionsonSchemaDesignPre-definedSchemaDesign
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
SupportsJOIN
statements
Doesn’tsupport JOIN
statements
Supportsmulti-dimensionaldata
typesandEmbeddedDocuments
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
Privilege-basedsecuritymodel Role-basedaccesscontrolwitha
flexiblesetofprivileges
Authenticatesauserandfacilitates
itwithuserprivileges onaparticular
database
Providesauthentication,auditing,
andauthorization.
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
Canhandlelargeunstructured
data.
FasterthanMySQLSlowerthanMongoDB
Cannotcopeupwithun-
structureddata.
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
ExcellentSupportExcellentSupport
Providessupportforsecurityfixes,
updates,
Providessupportformaintenance
releases,bugfixes,patches,and
updates
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
Triggers&SSLSupport
Querycaching
Providestextsearchingandindexing
Different storageengineswithvarious
Integratedreplicationsupport
Auto-sharding
In-memoryspeed
Comprehensivesecondaryindexes
Embeddeddatamodelssupport
Nativereplication
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
Supportsbuilt-inreplication,
sharding,andauto-elections.
Supportsmaster-slave
replication
Multisource replication allowsyouto
replicatefromseveralmastersinparallel.
Usesreplicasetstocreatemultiplecopiesof
thedata.Youcanalsocreateasecondary
database.
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
Bestfitfordatawithtablesandrows
Frequentupdates
Worksbetterforsmalldatasets
Modifylargevolumeofrecords
Strongdependencyonmulti-row
transactions
Bestfitforunstructureddata
Highwriteloads
Worksbetterforlargedatasets
Dataislocationbased
Highavailabilityinunstable
environment
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba
MySQLdatabaseisownedand
maintainedbytheOracle
Corporation.So,hasagood
activecommunity.
ThecommunityofMySQLis
muchbetterthanthatof
MongoDB.
www.edureka.co/mysql-dba
Well,thereisnoclearwinnerbetweenbothofthem.Thechoiceofdatabasecompletelydependsupontheschemaof
yourdatabaseandhowyouwishtoaccessit.Nevertheless, youcanuseMySQLwhenyouhaveafixedschemawitha
limitedbudgetandMongoDBwhileyouhaveanunstableschemawithin-builtsharding.
MySQLorMongoDB:Whichoneshouldbusinessgofor?
✓ Fixed Schema
✓ High Transaction
✓ Low Maintenance
✓ Data Security
✓ Limited Budget
✓ Unstable Schema
✓ No Database Administrator
✓ High Availability
✓ Cloud Computing
✓ In-Built Sharding
www.edureka.co/mysql-dba
www.edureka.co/mysql-dba

More Related Content

PPT
MySql slides (ppt)
PDF
MS-SQL SERVER ARCHITECTURE
PPTX
Sql vs NoSQL-Presentation
PPT
Database performance tuning and query optimization
PDF
SQL vs. NoSQL Databases
PDF
Big Query Basics
PPTX
Azure Synapse Analytics Overview (r1)
PDF
Introduction to column oriented databases
MySql slides (ppt)
MS-SQL SERVER ARCHITECTURE
Sql vs NoSQL-Presentation
Database performance tuning and query optimization
SQL vs. NoSQL Databases
Big Query Basics
Azure Synapse Analytics Overview (r1)
Introduction to column oriented databases

What's hot (20)

PPT
RDBMS vs NoSQL
PPT
SQL Queries
PPTX
bigquery.pptx
PDF
Data Catalog for Better Data Discovery and Governance
PPTX
introduction to NOSQL Database
PPTX
Nosql databases
PDF
Relational vs Non Relational Databases
PPTX
Mongodb basics and architecture
PPTX
Mongodb vs mysql
PDF
Top 65 SQL Interview Questions and Answers | Edureka
PDF
BigQuery for Beginners
PDF
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
PPTX
PySpark dataframe
PPTX
Introduction to Oracle Database
PPTX
Free Training: How to Build a Lakehouse
PPTX
Siligong.Data - May 2021 - Transforming your analytics workflow with dbt
PPS
PDF
The Great Debate: PostgreSQL vs MySQL
 
PPTX
Relational databases vs Non-relational databases
PPTX
Chapter 1 introduction to sql server
RDBMS vs NoSQL
SQL Queries
bigquery.pptx
Data Catalog for Better Data Discovery and Governance
introduction to NOSQL Database
Nosql databases
Relational vs Non Relational Databases
Mongodb basics and architecture
Mongodb vs mysql
Top 65 SQL Interview Questions and Answers | Edureka
BigQuery for Beginners
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
PySpark dataframe
Introduction to Oracle Database
Free Training: How to Build a Lakehouse
Siligong.Data - May 2021 - Transforming your analytics workflow with dbt
The Great Debate: PostgreSQL vs MySQL
 
Relational databases vs Non-relational databases
Chapter 1 introduction to sql server
Ad

Similar to SQL vs NoSQL | MySQL vs MongoDB Tutorial | Edureka (20)

PPTX
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
PPTX
Web 2.0 Development with IBM DB2
PPT
Microsoft sql-server-2016 Tutorial & Overview
PDF
SQL Server 2008 certification
PDF
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
TXT
Connection
PPTX
GDSC Backend Bootcamp.pptx
PPTX
working with PHP & DB's
PDF
Top 100 SQL Interview Questions and Answers
PDF
MongoDB performance
PPTX
Ms Sql Business Inteligence With My Sql
PDF
PPTX
ASP.NET MVC Performance
PPT
PPT
Nosql Introduction
PDF
MongoDB Tips and Tricks
PDF
Chapter 5 JDBC.pdf for stufent of computer andtudent It s
PPSX
JDBC: java DataBase connectivity
PDF
MySQL up and running 30 minutes.pdf
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Web 2.0 Development with IBM DB2
Microsoft sql-server-2016 Tutorial & Overview
SQL Server 2008 certification
Use Performance Insights To Enhance MongoDB Performance - (Manosh Malai - Myd...
Connection
GDSC Backend Bootcamp.pptx
working with PHP & DB's
Top 100 SQL Interview Questions and Answers
MongoDB performance
Ms Sql Business Inteligence With My Sql
ASP.NET MVC Performance
Nosql Introduction
MongoDB Tips and Tricks
Chapter 5 JDBC.pdf for stufent of computer andtudent It s
JDBC: java DataBase connectivity
MySQL up and running 30 minutes.pdf
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Python Programming Tutorial | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
Introduction to DevOps | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Python Programming Tutorial | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
Introduction to DevOps | Edureka

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Spectroscopy.pptx food analysis technology
Advanced methodologies resolving dimensionality complications for autism neur...
Programs and apps: productivity, graphics, security and other tools
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

SQL vs NoSQL | MySQL vs MongoDB Tutorial | Edureka