SlideShare a Scribd company logo
RDBMS to NoSQL
MongoDB
Types of
Databases
What is NoSQL?
Document databases?
What is
NoSQL?
NoSQL databases are storing information not in a tabular(excel
like format) as traditional RDBMS
NoSQL = “non relational”
Document
databases?
Document
databases?
Document database RDBMS
MongoDB documentation: RDBMS to MongoDB Migration Guide
MongoDB
features
Schemaless
Supports Indexes
Queries
Aggregations
Binary data
CLI tools
Schemaless
Created dynamically at first use
Schemaless
Schemaless
Normalized data
Schemaless
Normalized data
Schemaless
model references
• Modeling One-to-Few
• One-to-Many
• One-to-Squillions
• Denormalizing from Many -> One
• Denormalizing from One -> Many
• Denormalizing With “One-To-Squillions” Relationships
MongoDB documentation:
6 Rules of Thumb for MongoDB Schema Design: Part 1
6 Rules of Thumb for MongoDB Schema Design: Part 2
6 Rules of Thumb for MongoDB Schema Design: Part 3
BSON attaches significance to order when doing searches.
The order of keys within embedded objects matters in MongoDB,
{ firstname: "Phil", surname: "factor" }
does not match
{ { surname: "factor", firstname: "Phil" }
Schemaless
Twitter example
Indexes
MongoDB documentation: Indexes
Indexes
Queries
MongoDB documentation: Operators
Queries
MongoDB documentation: Operators
Aggregations
MapReduce
Aggregations
MapReduce
Aggregations
MongoDB documentation:
• Aggregation Pipeline Stages
• Aggregation Pipeline Operators
• Mongo db aggregation guide
Aggregation Framework
Queries
&
Aggregations
Query Translator - Convert MySQL queries to MongoDB syntax
Binary data
MongoDB documentation: GridFS
GridFS
specification for storing and retrieving files that exceed the
BSON-document size limit of 16 MB
GridFS
Binary data
MongoDB documentation: GridFS
GridFS
specification for storing and retrieving files that exceed the
BSON-document size limit of 16 MB
GridFS
CLI tools
Considerations
The SQL trap
Materializing query results
Schemaless disasters
The SQL trap
Bad documents design will require application side joins
If you have normalized your information you will suffer
problems with
• Referential integrity
• Race conditions by lack of transactions
• Multiple ”find” queries to retrieve information
IMPORTANT: up to MongoDB 4.0 the operations are atomic on
document level
The SQL trap
• Referential integrity
• Race conditions by lack of transactions
IMPORTANT: up to MongoDB 4.0 the operations are atomic on
document level
Materializing
query
results
Be careful when you materialize your query results
You should be using the cursor where you expect large query result
or you can:
• easily fill up the memory
• degrade server performance when the Garbage collector kicks in
• block the server requests
Schemaless
disasters
When no schema is enforced the data validation is left for the
developer to take care
Mistakes can easily happen when you store or query your data in
the wrong format
Example: If you store ZIP code as integer (0123) your queries with
the string (“0123”) will fail. Even harder will be if you mix string and
integer ZIP codes in your document
MongoDB
clients
Robo 3T
NoSQLBooster
Robo 3T
free version
• How to install
• MacOS
• brew cask install robo-3t
• Windows
• Go to robomongo.org
NoSQLBooster
trial
• How to install
• https://nosqlbooster.com/downloads
MongoDB
decision
criteria
Do I need data consistency?
Am I working with large data sets?
Embed or reference documents?
Prone to NoSQL injections?
(mongod-config-file.conf “javascriptEnabled:false”)
What is the cardinality of the relationship?
Do you need to access the object on the “N” side
separately, or only in the context of the parent
object?
What is the ratio of updates to reads for a
particular field?
Additional resources
• MongoDB Multi-Document ACID Transactions are GA
• RDBMS to MongoDB Migration Guide
• MongoDB’s Drive to Multi-Document Transactions
• MongoDB Drops ACID
• Partial Indexes
• 14 Things I Wish I’d Known When Starting with
MongoDB
• MongoDB: To Use Schemas or Not?
• Top 5 syntactic weirdnesses to be aware of in MongoDB

More Related Content

What's hot (20)

PDF
NoSQL
Radu Potop
 
PPTX
Introduction to MongoDB and CRUD operations
Anand Kumar
 
PPTX
NoSQL
Radu Vunvulea
 
PDF
01 nosql and multi model database
Mahdi Atawneh
 
PDF
10 mongo db
Ahmed Elbassel
 
PDF
Multi model-databases
Michael Hackstein
 
PDF
MongoDB World 2016: Poster Sessions eBook
MongoDB
 
PPTX
When to Use MongoDB...and When You Should Not...
MongoDB
 
PDF
Mongodb tutorial at Easylearning Guru
KCC Software Ltd. & Easylearning.guru
 
PDF
MongoDB vs OrientDB
Stefano Campese
 
PPTX
A Presentation on MongoDB Introduction - Habilelabs
HabileLabs
 
PPTX
CSCi226PPT1
Mahima Verma
 
PPTX
Introducción a NoSQL
MongoDB
 
PDF
Starting with MongoDB
Cesar Martinez
 
PPTX
Why MongoDB over other Databases - Habilelabs
HabileLabs
 
PPTX
Webinar: What's new in the .NET Driver
MongoDB
 
PPTX
Part One: Building Web Apps with the MERN Stack
MongoDB
 
PPT
Introduction to mongoDB
Cuelogic Technologies Pvt. Ltd.
 
PPTX
Web Scraping Technologies
Krishna Sunuwar
 
PPTX
NOSQL vs SQL
Mohammed Fazuluddin
 
NoSQL
Radu Potop
 
Introduction to MongoDB and CRUD operations
Anand Kumar
 
01 nosql and multi model database
Mahdi Atawneh
 
10 mongo db
Ahmed Elbassel
 
Multi model-databases
Michael Hackstein
 
MongoDB World 2016: Poster Sessions eBook
MongoDB
 
When to Use MongoDB...and When You Should Not...
MongoDB
 
Mongodb tutorial at Easylearning Guru
KCC Software Ltd. & Easylearning.guru
 
MongoDB vs OrientDB
Stefano Campese
 
A Presentation on MongoDB Introduction - Habilelabs
HabileLabs
 
CSCi226PPT1
Mahima Verma
 
Introducción a NoSQL
MongoDB
 
Starting with MongoDB
Cesar Martinez
 
Why MongoDB over other Databases - Habilelabs
HabileLabs
 
Webinar: What's new in the .NET Driver
MongoDB
 
Part One: Building Web Apps with the MERN Stack
MongoDB
 
Introduction to mongoDB
Cuelogic Technologies Pvt. Ltd.
 
Web Scraping Technologies
Krishna Sunuwar
 
NOSQL vs SQL
Mohammed Fazuluddin
 

Similar to Introduction to MongoDB (20)

PPT
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
DOCX
MongoDB DOC v1.5
Tharun Srinivasa
 
PDF
When NOT to use MongoDB
Mike Michaud
 
PPTX
MongoDB - Getting Started
Ahmed Helmy
 
PPTX
Nosql
ROXTAD71
 
PPTX
Nosql
Roxana Tadayon
 
PPTX
MongoDB for the SQL Server
Paulo Fagundes
 
PPT
Introduction to MongoDB
Ravi Teja
 
PPTX
Migrating from SQL to MongoDB
MongoDB
 
PDF
Introduction to NoSQL with MongoDB
Hector Correa
 
PDF
Beginner's guide to Mongodb and NoSQL
Maulin Shah
 
PDF
MongoDB Basics
Sarang Shravagi
 
PDF
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
PPTX
Mongo db
AbhiKhurana8
 
PPT
MongoDB Pros and Cons
johnrjenson
 
PDF
Streaming Analytics Unit 5 notes for engineers
ManjuAppukuttan2
 
PDF
Nosql part1 8th December
Ruru Chowdhury
 
PPTX
MongoDB
nikhil2807
 
PPTX
Einführung in MongoDB
NETUserGroupBern
 
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
MongoDB DOC v1.5
Tharun Srinivasa
 
When NOT to use MongoDB
Mike Michaud
 
MongoDB - Getting Started
Ahmed Helmy
 
Nosql
ROXTAD71
 
MongoDB for the SQL Server
Paulo Fagundes
 
Introduction to MongoDB
Ravi Teja
 
Migrating from SQL to MongoDB
MongoDB
 
Introduction to NoSQL with MongoDB
Hector Correa
 
Beginner's guide to Mongodb and NoSQL
Maulin Shah
 
MongoDB Basics
Sarang Shravagi
 
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
Mongo db
AbhiKhurana8
 
MongoDB Pros and Cons
johnrjenson
 
Streaming Analytics Unit 5 notes for engineers
ManjuAppukuttan2
 
Nosql part1 8th December
Ruru Chowdhury
 
MongoDB
nikhil2807
 
Einführung in MongoDB
NETUserGroupBern
 
Ad

Recently uploaded (20)

PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Ad

Introduction to MongoDB