SlideShare a Scribd company logo
MongoDB Intro
What is MongoDB?
▪ It’s a no-sql database.
▪ Document Oriented
▪ Data stored as BSON
Where you should use MongoDB
▪ If your application is write intensive: MongoDB has
super-fast writes.
– You can use capped collection for logging as well

▪ In built support for geo-spatial indexes.
▪ When the schema is not carved in stone. Really
helpful in Agile development.
Where you should use
MongoDB(cont)

▪ No migrations required in MongoDB
▪ In built support for sharding.
▪ Support for many languages
Faster writes
▪ Fan-out newsfeed
Faster writes
▪ Fan-out newsfeed.
▪ Foursquare does ~80 checkins/sec(1).
▪ Gotchas
– Lock at database level
▪

(1) https://docs.google.com/presentation/d/1q4R3F0AnWN-MQZqbysZ92nZ4_OC7bRzUCWfbmeHHcQQ/pub?start=false&loop=false&delayms=3000&pli=1#slide=id.ga365b3_0_5
Faster writes
▪ Fan-out newsfeed.
▪ Foursquare does ~80 checkins/sec(1).
▪ Gotchas
– Lock at database level
▪

(1) https://docs.google.com/presentation/d/1q4R3F0AnWN-MQZqbysZ92nZ4_OC7bRzUCWfbmeHHcQQ/pub?start=false&loop=false&delayms=3000&pli=1#slide=id.ga365b3_0_5
Capped collection for logging
▪ Collection == table
▪ Can be time based or size based
geo-spatial indexes
▪ Place your Domino’s order to the nearest outlet?
geo-spatial indexes
▪ db.collection('places').find(
{loc: {$near: [50,50], $maxDistance: 10}}).
Flexible schema
"_id" : ObjectId("526a55f14162689cbc0c0000"),
"first_name" : "First Name 0",
"last_name" : "last Name 0",
"add" : "Address number is 0",
"company" : "company 0",
"employee_id" : "0"

"_id" : ObjectId("526a55f14162689cbc0c0001"),
"first_name" : "First Name 1",
"last_name" : "last Name 1",
"add" : "Address number is 1",
"company" : "company 1",
"employee_id" : “1“,
“is_external” : “true”
Flexible schema
▪ In mySQL, extra space for “is_external” as “nil” for
most of the rows which leads to the wastage of
space.

▪ No need for the migration
No migration
▪ Migrations are expensive and time consuming. It
increase proportionally to the size of your table

▪ How does a migration happen
– Create a temp copy of the table with the
migration
– Delete the old table
– Make temp copy permanent
Sharding support

Source: http://www.slideshare.net/mdirolf/introduction-to-mongodb
In-built support for sharding.

More Related Content

PDF
Mongodb
PDF
Redis Overview
PDF
Back to Basics 2017: Mí primera aplicación MongoDB
PDF
進階使用Nodejs 淺談no sql(mongodb)
PPTX
MongoDB Introduction - Document Oriented Nosql Database
PPTX
KEY
PDF
Mongodb
Redis Overview
Back to Basics 2017: Mí primera aplicación MongoDB
進階使用Nodejs 淺談no sql(mongodb)
MongoDB Introduction - Document Oriented Nosql Database

What's hot (20)

PPTX
Back to Basics Spanish 4 Introduction to sharding
PPTX
Mongo db
KEY
MongoDB Hadoop DC
PDF
Mongo db transcript
PPSX
Mongodb
PDF
How do i Meet MongoDB
PDF
Steam Learn: An introduction to Redis
PPTX
Mongodb open data day 2014
PPTX
MongoDB basics & Introduction
PPTX
Back to Basics Webinar 6: Production Deployment
PDF
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
PPTX
Mongo db present
PDF
Mongodb (1)
PDF
Mongo db basics
ODP
MongoDB - Ekino PHP
ODP
Redis IU
PPTX
Tag based sharding presentation
PDF
MongoDB Sharding Fundamentals
PDF
ODP
BSides Rochester 2018: Chris Partridge: Turning Domain Data Into Domain Intel...
Back to Basics Spanish 4 Introduction to sharding
Mongo db
MongoDB Hadoop DC
Mongo db transcript
Mongodb
How do i Meet MongoDB
Steam Learn: An introduction to Redis
Mongodb open data day 2014
MongoDB basics & Introduction
Back to Basics Webinar 6: Production Deployment
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
Mongo db present
Mongodb (1)
Mongo db basics
MongoDB - Ekino PHP
Redis IU
Tag based sharding presentation
MongoDB Sharding Fundamentals
BSides Rochester 2018: Chris Partridge: Turning Domain Data Into Domain Intel...
Ad

Viewers also liked (20)

PPTX
PPTX
Intro to nodejs
PPTX
Node js Lunch and learn: Session 2
PPTX
Better performance using redis
PPTX
Mastering the MongoDB Javascript Shell
KEY
An Evening with MongoDB - Orlando: Welcome and Keynote
KEY
Mongodb intro
ODP
MongoDB Devops Madrid February 2012
PPTX
ODP
Seth Edwards on MongoDB
PPTX
Getting Started with MongoDB
PPTX
mongodb-brief-intro-february-2012
PDF
Intro to NoSQL and MongoDB
KEY
Introduction to MongoDB
PPTX
Schema design with MongoDB (Dwight Merriman)
ODP
Introduction to MongoDB
ODP
Introduction to MongoDB
PPTX
MongoDB 3.0
PDF
Plan de entrenamiento Maratón de Madrid Mes 3
PDF
Zero to Mongo in 60 Hours
Intro to nodejs
Node js Lunch and learn: Session 2
Better performance using redis
Mastering the MongoDB Javascript Shell
An Evening with MongoDB - Orlando: Welcome and Keynote
Mongodb intro
MongoDB Devops Madrid February 2012
Seth Edwards on MongoDB
Getting Started with MongoDB
mongodb-brief-intro-february-2012
Intro to NoSQL and MongoDB
Introduction to MongoDB
Schema design with MongoDB (Dwight Merriman)
Introduction to MongoDB
Introduction to MongoDB
MongoDB 3.0
Plan de entrenamiento Maratón de Madrid Mes 3
Zero to Mongo in 60 Hours
Ad

Similar to Mongo db intro new (20)

PDF
FIWARE Wednesday Webinars - Strategies for Context Data Persistence
PDF
MyRocks introduction and production deployment
PDF
Bringing spatial love to your python application
PDF
MongoDB: Advantages of an Open Source NoSQL Database
PDF
Mongo db first steps with csharp
PPT
Introduction to MongoDB
PDF
PPT
Rapid, Scalable Web Development with MongoDB, Ming, and Python
PDF
Quick overview of MongoDB
PDF
More Than Just The Tip Of The Iceberg.pdf
PPTX
MongoDB Workshop Universidad de Huelva
PDF
PostgreSQL and Sphinx pgcon 2013
PDF
Lightning Fast Dataframes with Polars
PPTX
AWS Big Data Demystified #1: Big data architecture lessons learned
PDF
Percona 服务器与 XtraDB 存储引擎
PPTX
MongoDB 2.4 and spring data
PPTX
The Hive Think Tank: Rocking the Database World with RocksDB
KEY
Mongo NYC PHP Development
PDF
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PPTX
MongoDB by Emroz sardar.
FIWARE Wednesday Webinars - Strategies for Context Data Persistence
MyRocks introduction and production deployment
Bringing spatial love to your python application
MongoDB: Advantages of an Open Source NoSQL Database
Mongo db first steps with csharp
Introduction to MongoDB
Rapid, Scalable Web Development with MongoDB, Ming, and Python
Quick overview of MongoDB
More Than Just The Tip Of The Iceberg.pdf
MongoDB Workshop Universidad de Huelva
PostgreSQL and Sphinx pgcon 2013
Lightning Fast Dataframes with Polars
AWS Big Data Demystified #1: Big data architecture lessons learned
Percona 服务器与 XtraDB 存储引擎
MongoDB 2.4 and spring data
The Hive Think Tank: Rocking the Database World with RocksDB
Mongo NYC PHP Development
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
MongoDB by Emroz sardar.

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Spectroscopy.pptx food analysis technology
PPTX
A Presentation on Artificial Intelligence
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Tartificialntelligence_presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PDF
A comparative analysis of optical character recognition models for extracting...
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Digital-Transformation-Roadmap-for-Companies.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Spectroscopy.pptx food analysis technology
A Presentation on Artificial Intelligence
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Getting Started with Data Integration: FME Form 101
Tartificialntelligence_presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
A comparative analysis of optical character recognition models for extracting...

Mongo db intro new

  • 2. What is MongoDB? ▪ It’s a no-sql database. ▪ Document Oriented ▪ Data stored as BSON
  • 3. Where you should use MongoDB ▪ If your application is write intensive: MongoDB has super-fast writes. – You can use capped collection for logging as well ▪ In built support for geo-spatial indexes. ▪ When the schema is not carved in stone. Really helpful in Agile development.
  • 4. Where you should use MongoDB(cont) ▪ No migrations required in MongoDB ▪ In built support for sharding. ▪ Support for many languages
  • 6. Faster writes ▪ Fan-out newsfeed. ▪ Foursquare does ~80 checkins/sec(1). ▪ Gotchas – Lock at database level ▪ (1) https://docs.google.com/presentation/d/1q4R3F0AnWN-MQZqbysZ92nZ4_OC7bRzUCWfbmeHHcQQ/pub?start=false&loop=false&delayms=3000&pli=1#slide=id.ga365b3_0_5
  • 7. Faster writes ▪ Fan-out newsfeed. ▪ Foursquare does ~80 checkins/sec(1). ▪ Gotchas – Lock at database level ▪ (1) https://docs.google.com/presentation/d/1q4R3F0AnWN-MQZqbysZ92nZ4_OC7bRzUCWfbmeHHcQQ/pub?start=false&loop=false&delayms=3000&pli=1#slide=id.ga365b3_0_5
  • 8. Capped collection for logging ▪ Collection == table ▪ Can be time based or size based
  • 9. geo-spatial indexes ▪ Place your Domino’s order to the nearest outlet?
  • 10. geo-spatial indexes ▪ db.collection('places').find( {loc: {$near: [50,50], $maxDistance: 10}}).
  • 11. Flexible schema "_id" : ObjectId("526a55f14162689cbc0c0000"), "first_name" : "First Name 0", "last_name" : "last Name 0", "add" : "Address number is 0", "company" : "company 0", "employee_id" : "0" "_id" : ObjectId("526a55f14162689cbc0c0001"), "first_name" : "First Name 1", "last_name" : "last Name 1", "add" : "Address number is 1", "company" : "company 1", "employee_id" : “1“, “is_external” : “true”
  • 12. Flexible schema ▪ In mySQL, extra space for “is_external” as “nil” for most of the rows which leads to the wastage of space. ▪ No need for the migration
  • 13. No migration ▪ Migrations are expensive and time consuming. It increase proportionally to the size of your table ▪ How does a migration happen – Create a temp copy of the table with the migration – Delete the old table – Make temp copy permanent
  • 15. In-built support for sharding.