SlideShare a Scribd company logo
MongoDB
What is a document?
• MS Word file stored in Sharepoint
• JSON or XML
What is a document?
{
“campaign_id”: 12,
“created_on”: ISODate("2013-04-08T18:10:48Z")
“name”: “Trade LG”,
“published”: true,
“status_id”: 2
}
What is a document?
{
“campaign_id”: 12,
“created_on”: ISODate("2013-04-08T18:10:48Z")
“name”: “Trade LG”,
“published”: true,
“status_id”: 2,
“keywords”: [ “trade lg”, “yahoo”, “test” ]
}
What is a document?
{
“campaign_id”: 12,
“created_on”: ISODate("2013-04-08T18:10:48Z")
“name”: “Trade LG [01JUL2013] [1308]”,
“published”: true,
“status_id”: 2,
“keywords”: [ “trade lg”, “yahoo”, “test” ],
“placements”: [
{
“placement_id”: 14,
“name”: “[3495] [01JUL2013] ROS 20minutes 300X250”
}
]
}
What is a document?
{
“campaign_id”: 12,
“created_on”: ISODate("2013-04-08T18:10:48Z")
“name”: “Trade LG [01JUL2013] [1308]”,
“published”: true,
“status_id”: 2,
“keywords”: [ “trade lg”, “yahoo”, “test” ],
“placements”: [
{
“placement_id”: 14,
“name”: “[3495] [01JUL2013] ROS 20minutes 300X250”,
“funnels”: [
{ “funnel_id”: 15, “name”: “funnel_1”, “published”: true },
{ “funnel_id”: 16 “name”: “funnel_2”, “published”: false },
{ “funnel_id”: 17, “name”: “funnel_3”, “published”: true }
]
}
]
}
Indexes
• ensureIndex( { “created_on”:1 } )
• ensureIndex( { “published”: 1, “status_id”: 1} )
• ensureIndex( { “keywords”: 1} )
• ensureIndex( { “placements.funnels.published”: 1 } )
Querying
• Query by example
• find({“campaign_id”: 12})
• find({

“published”: true,
“created_on”: {
$gt: ISODate("2013-04-01")
}
});
Scalability
• Horizontal
• Master/Slave replication
• Sharding
Read Optimization
Write Optimization
Backup Strategies
• Replication
• Files backup
• mongodump + mongorestore
• Journal backup
Deployment Options
• Hosted solutions
• Single node
• Replica set
• Replication across data centers
Who uses MongoDB?
Internal POC
• 24,000,000+ activities
• 11GB
• 14,500 inserts per second
• Fetch activities by user id:
44,438 results, ~60ms

• Fetch activities by type name:
3,585,101 results, ~6942ms

• Single server: M1-Large(300$)
Introduction to MongoDB

More Related Content

PPTX
NoSQL Endgame JCON Conference 2020
PPTX
Displaying message on web page in Javascript
PDF
0045cbaf1480eb3d
PDF
E-Commerce search with Elasticsearch
PDF
0045cbf22d80b68f
PPTX
WP 2: overview of the progress of WP2 on the "CLARIAH-day 22-01-2016
PPTX
Azure Database Options - NoSql vs Sql
PDF
How Financial Services Organizations Use MongoDB
NoSQL Endgame JCON Conference 2020
Displaying message on web page in Javascript
0045cbaf1480eb3d
E-Commerce search with Elasticsearch
0045cbf22d80b68f
WP 2: overview of the progress of WP2 on the "CLARIAH-day 22-01-2016
Azure Database Options - NoSql vs Sql
How Financial Services Organizations Use MongoDB

Viewers also liked (12)

DOCX
Bookmarking new
PPTX
Soda fountains machine
PPT
Introduction to CQRS and DDDD
PPTX
Soda hub machine
DOCX
نبارك مهنئيــــــــــــــــن بارًّا من 4
PDF
1502.03424v3 dark energy decoherence
PPT
Internal Project: Under the Hood
PPTX
로맨스스캠 훔쳐보기
PDF
Introduction to Event Sourcing and CQRS
PDF
여행의 기술(배포용)
PDF
Mind Your Business. And Its Logic
PPTX
Introduction to Event Sourcing and CQRS (IASA-IL)
Bookmarking new
Soda fountains machine
Introduction to CQRS and DDDD
Soda hub machine
نبارك مهنئيــــــــــــــــن بارًّا من 4
1502.03424v3 dark energy decoherence
Internal Project: Under the Hood
로맨스스캠 훔쳐보기
Introduction to Event Sourcing and CQRS
여행의 기술(배포용)
Mind Your Business. And Its Logic
Introduction to Event Sourcing and CQRS (IASA-IL)
Ad

Similar to Introduction to MongoDB (20)

PDF
3-Mongodb and Mapreduce Programming.pdf
PPTX
MongoDB Introduction and Data Modelling
PPTX
Everything You Need to Know About MongoDB Development.pptx
PDF
MongoDB NoSQL database a deep dive -MyWhitePaper
DOCX
MongoDB DOC v1.5
PPTX
Mongodb
PPTX
MongoDB.local Sydney: An Introduction to Document Databases with MongoDB
PPTX
Schema Design Best Practices with Buzz Moschetti
PDF
MongoDB: Agile Combustion Engine
PDF
ASAS 2015 - Norberto Leite
PPTX
MongoDB_ppt.pptx
PDF
MongoDB company and case studies - john hong
PPTX
An Evening with MongoDB Detroit 2013
PPT
Webinar: How MongoDB is making Government Better, Faster, Smarter
PPTX
mongodb introduction11111111111111111111
PPTX
Getting Started with MongoDB
PPTX
MongoDB Session 3
PPTX
29thMarchMongodb and its history features.pptx
PDF
Streaming Analytics Unit 5 notes for engineers
3-Mongodb and Mapreduce Programming.pdf
MongoDB Introduction and Data Modelling
Everything You Need to Know About MongoDB Development.pptx
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB DOC v1.5
Mongodb
MongoDB.local Sydney: An Introduction to Document Databases with MongoDB
Schema Design Best Practices with Buzz Moschetti
MongoDB: Agile Combustion Engine
ASAS 2015 - Norberto Leite
MongoDB_ppt.pptx
MongoDB company and case studies - john hong
An Evening with MongoDB Detroit 2013
Webinar: How MongoDB is making Government Better, Faster, Smarter
mongodb introduction11111111111111111111
Getting Started with MongoDB
MongoDB Session 3
29thMarchMongodb and its history features.pptx
Streaming Analytics Unit 5 notes for engineers
Ad

Recently uploaded (20)

PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecture types and enterprise applications.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPT
What is a Computer? Input Devices /output devices
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
TLE Review Electricity (Electricity).pptx
OMC Textile Division Presentation 2021.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
observCloud-Native Containerability and monitoring.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Developing a website for English-speaking practice to English as a foreign la...
DP Operators-handbook-extract for the Mautical Institute
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
Programs and apps: productivity, graphics, security and other tools
Architecture types and enterprise applications.pdf
Chapter 5: Probability Theory and Statistics
Final SEM Unit 1 for mit wpu at pune .pptx
Web App vs Mobile App What Should You Build First.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Getting started with AI Agents and Multi-Agent Systems
A contest of sentiment analysis: k-nearest neighbor versus neural network
What is a Computer? Input Devices /output devices
Group 1 Presentation -Planning and Decision Making .pptx

Introduction to MongoDB

  • 2. What is a document? • MS Word file stored in Sharepoint • JSON or XML
  • 3. What is a document? { “campaign_id”: 12, “created_on”: ISODate("2013-04-08T18:10:48Z") “name”: “Trade LG”, “published”: true, “status_id”: 2 }
  • 4. What is a document? { “campaign_id”: 12, “created_on”: ISODate("2013-04-08T18:10:48Z") “name”: “Trade LG”, “published”: true, “status_id”: 2, “keywords”: [ “trade lg”, “yahoo”, “test” ] }
  • 5. What is a document? { “campaign_id”: 12, “created_on”: ISODate("2013-04-08T18:10:48Z") “name”: “Trade LG [01JUL2013] [1308]”, “published”: true, “status_id”: 2, “keywords”: [ “trade lg”, “yahoo”, “test” ], “placements”: [ { “placement_id”: 14, “name”: “[3495] [01JUL2013] ROS 20minutes 300X250” } ] }
  • 6. What is a document? { “campaign_id”: 12, “created_on”: ISODate("2013-04-08T18:10:48Z") “name”: “Trade LG [01JUL2013] [1308]”, “published”: true, “status_id”: 2, “keywords”: [ “trade lg”, “yahoo”, “test” ], “placements”: [ { “placement_id”: 14, “name”: “[3495] [01JUL2013] ROS 20minutes 300X250”, “funnels”: [ { “funnel_id”: 15, “name”: “funnel_1”, “published”: true }, { “funnel_id”: 16 “name”: “funnel_2”, “published”: false }, { “funnel_id”: 17, “name”: “funnel_3”, “published”: true } ] } ] }
  • 7. Indexes • ensureIndex( { “created_on”:1 } ) • ensureIndex( { “published”: 1, “status_id”: 1} ) • ensureIndex( { “keywords”: 1} ) • ensureIndex( { “placements.funnels.published”: 1 } )
  • 8. Querying • Query by example • find({“campaign_id”: 12}) • find({ “published”: true, “created_on”: { $gt: ISODate("2013-04-01") } });
  • 12. Backup Strategies • Replication • Files backup • mongodump + mongorestore • Journal backup
  • 13. Deployment Options • Hosted solutions • Single node • Replica set • Replication across data centers
  • 15. Internal POC • 24,000,000+ activities • 11GB • 14,500 inserts per second • Fetch activities by user id: 44,438 results, ~60ms • Fetch activities by type name: 3,585,101 results, ~6942ms • Single server: M1-Large(300$)