SlideShare a Scribd company logo
1 of 16
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$)
What is a MongoDB document explained with examples

More Related Content

Viewers also liked

Introduction to CQRS and DDDD
Introduction to CQRS and DDDDIntroduction to CQRS and DDDD
Introduction to CQRS and DDDDVladik Khononov
 
نبارك مهنئيــــــــــــــــن بارًّا من 4
نبارك مهنئيــــــــــــــــن            بارًّا من 4نبارك مهنئيــــــــــــــــن            بارًّا من 4
نبارك مهنئيــــــــــــــــن بارًّا من 4Rezk Albeialy
 
1502.03424v3 dark energy decoherence
1502.03424v3 dark energy decoherence1502.03424v3 dark energy decoherence
1502.03424v3 dark energy decoherenceJam Tan
 
Internal Project: Under the Hood
Internal Project: Under the HoodInternal Project: Under the Hood
Internal Project: Under the HoodVladik Khononov
 
로맨스스캠 훔쳐보기
로맨스스캠 훔쳐보기로맨스스캠 훔쳐보기
로맨스스캠 훔쳐보기Sungjin Hong
 
Introduction to Event Sourcing and CQRS
Introduction to Event Sourcing and CQRSIntroduction to Event Sourcing and CQRS
Introduction to Event Sourcing and CQRSVladik Khononov
 
여행의 기술(배포용)
여행의 기술(배포용)여행의 기술(배포용)
여행의 기술(배포용)Sungjin Hong
 
Mind Your Business. And Its Logic
Mind Your Business. And Its LogicMind Your Business. And Its Logic
Mind Your Business. And Its LogicVladik Khononov
 
Introduction to Event Sourcing and CQRS (IASA-IL)
Introduction to Event Sourcing and CQRS (IASA-IL)Introduction to Event Sourcing and CQRS (IASA-IL)
Introduction to Event Sourcing and CQRS (IASA-IL)Vladik Khononov
 

Viewers also liked (12)

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

Similar to What is a MongoDB document explained with examples

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMongoDB
 
Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113Erwan Pigneul
 
Curiosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunesCuriosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunesPagesJaunes
 
Webinar: Position and Trade Management with MongoDB
Webinar: Position and Trade Management with MongoDBWebinar: Position and Trade Management with MongoDB
Webinar: Position and Trade Management with MongoDBMongoDB
 
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyHarnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyAndré Ricardo Barreto de Oliveira
 
Building LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDBBuilding LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDBJake Dejno
 
MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...
MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...
MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...MongoDB
 
ElasticSearch in action
ElasticSearch in actionElasticSearch in action
ElasticSearch in actionCodemotion
 
Montreal Elasticsearch Meetup
Montreal Elasticsearch MeetupMontreal Elasticsearch Meetup
Montreal Elasticsearch MeetupLoïc Bertron
 
Back to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationBack to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationJoe Drumgoole
 
Back to Basics: My First MongoDB Application
Back to Basics: My First MongoDB ApplicationBack to Basics: My First MongoDB Application
Back to Basics: My First MongoDB ApplicationMongoDB
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennJavaDayUA
 
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...MongoDB
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revisedMongoDB
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessMongoDB
 
Streaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comStreaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comMongoDB
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDBrogerbodamer
 
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLHoracio Gonzalez
 
moma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layermoma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layerGadi Oren
 

Similar to What is a MongoDB document explained with examples (20)

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113
 
Curiosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunesCuriosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunes
 
Webinar: Position and Trade Management with MongoDB
Webinar: Position and Trade Management with MongoDBWebinar: Position and Trade Management with MongoDB
Webinar: Position and Trade Management with MongoDB
 
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyHarnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
 
Building LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDBBuilding LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDB
 
MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...
MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...
MongoDB World 2019: Searching for a Better Me: How Simple Habit Uses $text Se...
 
ElasticSearch in action
ElasticSearch in actionElasticSearch in action
ElasticSearch in action
 
Montreal Elasticsearch Meetup
Montreal Elasticsearch MeetupMontreal Elasticsearch Meetup
Montreal Elasticsearch Meetup
 
Back to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationBack to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB Application
 
Back to Basics: My First MongoDB Application
Back to Basics: My First MongoDB ApplicationBack to Basics: My First MongoDB Application
Back to Basics: My First MongoDB Application
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revised
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
 
Streaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comStreaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.com
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDB
 
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
 
moma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layermoma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layer
 

Recently uploaded

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

What is a MongoDB document explained with examples

  • 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$)