SlideShare a Scribd company logo
Eric Reid, Senior Consulting Engineer, MongoDB
Don't Panic –
The Hitchhiker's Guide to the MongoDB Galaxy
Volume 1
In Which We Define the Context of This Talk
The Hitchhiker’s Guide to the Galaxy
Douglas Adams
"The Guide is described as resembling 'a
small, thin, flexible lap computer’ encased
in a 'sturdy plastic cover' with the words
'Don't Panic' inscribed on it 'in large,
friendly letters'. It is presumably of robust
construction, making it able to withstand
falling through time/space wormholes and
being thrown into swamps, being rescued,
and still operating.”
A Slightly More Optimistic Message…
YOU
GOT
THIS!
% whoami
Gorilla gorilla (lowland)
Gorilla beringei (mountain)
Great Ape Conservation Fund
Part Silverback…
% whoami
42Gorilla gorilla (lowland)
Gorilla beringei (mountain)
Great Ape Conservation Fund
Part Silverback… Part Hitchhiker
Welcome, Fellow Hitchhiker
Is this you?
§ “I’ve been told I need to learn this MongoDB thing…”
§ “I want to learn MongoDB, but I don’t know where to start…”
§ “MongoDB seems to be expanding too fast to keep up with…”
§ “When I ask how to join tables in MongoDB, people snort…”
§ ”But, but, I’ve been using RDBMSs, like, forever !!!”
Welcome, Fellow Hitchhiker
Is this you?
§ “I’ve been told I need to learn this MongoDB thing…”
§ “I want to learn MongoDB, but I don’t know where to start…”
§ “MongoDB seems to be expanding too fast to keep up with…”
§ “When I ask how to join tables in MongoDB, people snort…”
§ ”But, but, I’ve been using RDBMSs forever !!!”
YOU
GOT
THIS!
Volume 2
In Which We Attempt to Assure You It’ll Be OK
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
Making Sense Of All Things Mongo
Comparison: A Certain Red-ish, 40-year-old RDBMS
§ All since 1977
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
The MongoDB Community
Open Source. Freely available for use. Thousands of
users, millions of deployments.
Server Community Edition
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
.
Server Enterprise Edition
MongoDB, Inc.
Support. Best Practices. DBaaS. Enterprise
functionality/features . Innovation.
Atlas MongoDB Service
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
.
Server Enterprise Edition
MongoDB, Inc.
Support. Best Practices. DBaaS. Enterprise
functionality/features . Innovation.
Atlas MongoDB Service
BI Connector
[connect to BI Tools]
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
.
Server Enterprise Edition
MongoDB, Inc.
Support. Best Practices. DBaaS. Enterprise
functionality/features . Innovation.
Atlas MongoDB Service
Ops Manager
[on-prem mgmt]
Cloud Manager
[hosted mgmt]
BI Connector
[connect to BI Tools]
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
.
Server Enterprise Edition
MongoDB, Inc.
Support. Best Practices. DBaaS. Enterprise
functionality/features . Innovation.
Atlas MongoDB Service
Ops Manager
[on-prem mgmt]
Sync + Stitch
[mobile / serverless]
Cloud Manager
[hosted mgmt]
BI Connector
[connect to BI Tools]
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ All since 2007-2008 (really, since c. 2013)
.
Server Enterprise Edition
MongoDB, Inc.
Support. Best Practices. DBaaS. Enterprise
functionality/features . Innovation.
Atlas MongoDB Service
Ops Manager
[on-prem mgmt]
Sync + Stitch
[mobile / serverless]
Cloud Manager
[hosted mgmt]
BI Connector
[connect to BI Tools]
Charts
[built-in visualization]
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ Too much stuff… panic… rising…
= ?
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
§ Too much stuff… panic… rising…
= ?
YOU
GOT
THIS!
Making Sense Of All Things Mongo
Our Rapidly Expanding Universe
Big MongoDB Rule:
It’s OK (and often desirable) to Start Simply
Volume 3
In Which We Enlighten Fellow Hitchhikers
In Search of the ‘Aha!’ Moments
The Story of the Data Designer
who had to have a schema…
In Search of the ‘Aha!’ Moments
Top 5 Takeaways for new MongoDB Hitchhikers
Top 5 Takeaways for new MongoDB Hitchhikers
1) MongoDB is proven for uses Big and Small
Top 5 Takeaways for new MongoDB Hitchhikers
1) MongoDB is proven for uses Big and Small
2) One needn’t use (or even fully understand) the more complex
pieces of MongoDB to use it well
Top 5 Takeaways for new MongoDB Hitchhikers
1) MongoDB is proven for uses Big and Small
2) One needn’t use (or even fully understand) the more complex
pieces of MongoDB to use it well
3) “Schemaless” is both a misnomer and an opportunity
Top 5 Takeaways for new MongoDB Hitchhikers
1) MongoDB is proven for uses Big and Small
2) One needn’t use (or even fully understand) the more complex
pieces of MongoDB to use it well
3) “Schemaless” is both a misnomer and an opportunity
4) New Hitchhikers need to check their preconceptions at the
door
Top 5 Takeaways for new MongoDB Hitchhikers
1) MongoDB is proven for uses Big and Small
2) One needn’t use (or even fully understand) the more complex
pieces of MongoDB to use it well
3) “Schemaless” is both a misnomer and an opportunity
4) New Hitchhikers need to check their preconceptions at the
door
5) Let your access patterns determine your data structure
Making Sense Of All Things Mongo
Start Simply and Locally
• MongoDB Server on your {laptop,desktop}, plus Compass or
MongoDB Shell
• Be Careful: mongos is not the MongoDB Shell!
• Be aware of MongoDB Shell database ‘context’
% mongo localhost:27017
> use myDatabase
switched to db myDatabase
> db.myCollection.insert({field:"this is in myDatabase.myCollection"})
WriteResult({ "nInserted" : 1 })
> use admin
switched to db admin
> db.myCollection.find()
>
Making Sense Of All Things Mongo
Start Simply and Locally
Making Sense Of All Things Mongo
Start Simply and Locally
• MongoDB Server on your {laptop,desktop}, plus Compass or
MongoDB Shell
Making Sense Of All Things Mongo
Start Simply and Locally
• MongoDB Server on your {laptop,desktop}, plus Compass or
MongoDB Shell
• Be Careful: mongos is not the MongoDB Shell
Making Sense Of All Things Mongo
Start Simply and Locally
• MongoDB Server on your {laptop,desktop}, plus Compass or
MongoDB Shell
• Be Careful: mongos is not the MongoDB Shell!
• Be aware of MongoDB Shell database ‘context’
% mongo localhost:27017
> use myDatabase
switched to db myDatabase
> db.myCollection.insert({field:"this is in myDatabase.myCollection"})
WriteResult({ "nInserted" : 1 })
> use admin
switched to db admin
> db.myCollection.find()
>
Making Sense Of All Things Mongo
Coming From RDBMS-land?
Making Sense Of All Things Mongo
Coming From RDBMS-land?
Jumping In
Data Design
Jumping In
Data Design
§ Access patterns drive MongoDB data design
Jumping In
Data Design
§ Access patterns drive MongoDB data design
§ Collection definition cannot be done in a vacuum
§ First: “What are the main types of things in your database?”
§ Then: “What are your apps’ most important queries?”
§ Then: “What are your apps’ most important writes?”
Jumping In
Data Design
§ Access patterns drive MongoDB data design
§ Collection definition cannot be done in a vacuum
§ First: “What are the main types of things in your database?”
§ Then: “What are your apps’ most important queries?”
§ Then: “What are your apps’ most important writes?”
§ Never, never, never, never, never expect to port an app from an
RDBMS with a 1:1 mapping from tables to collections
Jumping In
Data Design
§ Access patterns drive MongoDB data design
§ Collection definition cannot be done in a vacuum
§ First: “What are the main types of things in your database?”
§ Then: “What are your apps’ most important queries?”
§ Then: “What are your apps’ most important writes?”
§ Never, never, never, never, never expect to port an app from an
RDBMS with a 1:1 mapping from tables to collections
§ Know thy working set
“If I’d Only Known…”
Tales from the Road Warrior
“If I’d Only Known…”
Tales from the Road Warrior
§ MongoDB Shell is a JavaScript interpreter!
> for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) }
{ "acknowledged" : true, "insertedId" : 20 }
“If I’d Only Known…”
Tales from the Road Warrior
§ MongoDB Shell is a JavaScript interpreter!
§ MongoDB Shell has shortcuts
> for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) }
{ "acknowledged" : true, "insertedId" : 20 }
“If I’d Only Known…”
Tales from the Road Warrior
§ MongoDB Shell is a JavaScript interpreter!
§ MongoDB Shell has shortcuts
§ Don’t try to be overly clever with Boolean values
§ {$ne: true} is not the same as {$eq: false}
> for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) }
{ "acknowledged" : true, "insertedId" : 20 }
“If I’d Only Known…”
Tales from the Road Warrior
§ MongoDB Shell is a JavaScript interpreter!
§ MongoDB Shell has shortcuts
§ Don’t try to be overly clever with Boolean values
§ {$ne: true} is not the same as {$eq: false}
§ Copy-and-Paste can introduce “smart quotes”; MongoDB Shell
doesn’t like “smart quotes”
> for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) }
{ "acknowledged" : true, "insertedId" : 20 }
And now, Eric’s ‘Aha!’ Moment…
The story of bindIp
And now, Eric’s ‘Aha!’ Moment…
The story of bindIp
net:
port: 27017
bindIp: 127.0.0.1, 192.168.0.101
mongod.conf
Tools for Your MongoDB Life
Tools for Your MongoDB Life
m
§ https://github.com/aheckmann/m
§ Manage multiple versions of
MongoDB, quickly switch between
them
§ Used for: local sandboxes
$ m
4.0.5-ent
ο 4.0.8
4.0.9
$ m 4.0.9
Activating 4.0.9
$ mongod --version
db version v4.0.9
Tools for Your MongoDB Life
mtools
§ https://github.com/rueckstiess/mto
ols
§ a) Log analysis and visualization of
any mongod logfile
§ b) mlaunch quick spin-up script;
Stand up local test Standalone,
Replica Set, or Sharded Cluster in
seconds
$ mlaunch init --replicaset --
sharded 3
launching: "mongod" on port 27018
launching: "mongod" on port 27019
:
:
Tools for Your MongoDB Life
mgeneratejs
§ https://github.com/rueckstiess/mgeneratejs
§ Generate semi-structured JSON for import w/mongoimport
§ Used for: any instance
$ mgeneratejs '{"name": "$name", "age": "$age", "emails": {"$array":
{"of": "$email", "number": 3}}}' -n 1000000 > collectionData.json
$ mongoimport –d test –c myCollection collectionData.json
2019-04-18T17:31:26.922-0400 connected to: localhost
2019-04-18T17:32:57.893-0400 imported 1000000 documents
O, Where to Turn?
Community Resources for MongoDB Novitiate
O, Where to Turn?
Community Resources for MongoDB Novitiate
§ The MongoDB Slack Community is the place to meet other users, learn,
and get answers to questions.
O, Where to Turn?
Community Resources for MongoDB Novitiate
§ The MongoDB Slack Community is the place to meet other users, learn,
and get answers to questions.
§ MongoDB-User Community Support Forum: A community forum best
suited for open-ended, opinion-based, or general questions about
MongoDB. You can post and view the forum via the Google Groups web
interface or subscribe to updates via email.
O, Where to Turn?
Community Resources for MongoDB Novitiate
§ The MongoDB Slack Community is the place to meet other users, learn,
and get answers to questions.
§ MongoDB-User Community Support Forum: A community forum best
suited for open-ended, opinion-based, or general questions about
MongoDB. You can post and view the forum via the Google Groups web
interface or subscribe to updates via email.
§ Stack Overflow: A community Q&A site for specific programming
questions with factual, rather than subjective, answers
O, Where to Turn?
Community Resources for MongoDB Novitiate
§ The MongoDB Slack Community is the place to meet other users, learn,
and get answers to questions.
§ MongoDB-User Community Support Forum: A community forum best
suited for open-ended, opinion-based, or general questions about
MongoDB. You can post and view the forum via the Google Groups web
interface or subscribe to updates via email.
§ Stack Overflow: A community Q&A site for specific programming
questions with factual, rather than subjective, answers
§ DBA Stack Exchange: A community Q&A site for database administrators
and other database professionals.
O, Where to Turn?
Enterprise Resources for MongoDB Novitiate
O, Where to Turn?
Enterprise Resources for MongoDB Novitiate
§ MongoDB Technical Support provides Enterprise Customers with timely
technical support for MongoDB products
O, Where to Turn?
Enterprise Resources for MongoDB Novitiate
§ MongoDB Technical Support provides Enterprise Customers with timely
technical support for MongoDB products
§ MongoDB Professional Services gives Customers access to world class
MongoDB Best Practices and expertise on-site
O, Where to Turn?
Enterprise Resources for MongoDB Novitiate
§ MongoDB Technical Support provides Enterprise Customers with timely
technical support for MongoDB products
§ MongoDB Professional Services gives Customers access to world class
MongoDB Best Practices and expertise on-site
§ MongoDB University serves up free self-paced or instructor-paced virtual
courses, and offers MongoDB Admin and Developer Certifications
Summing Up
Summing Up
§ It’s OK to start simply with MongoDB
Summing Up
§ It’s OK to start simply with MongoDB
§ Be open to the new concepts and paradigms offered by
MongoDB
Summing Up
§ It’s OK to start simply with MongoDB
§ Be open to the new concepts and paradigms offered by
MongoDB
§ The ‘Aha!’ moments will come in time – look for them!
Summing Up
§ It’s OK to start simply with MongoDB
§ Be open to the new concepts and paradigms offered by
MongoDB
§ The ‘Aha!’ moments will come in time – look for them!
§ Don’t be afraid to ask
Summing Up
§ It’s OK to start simply with MongoDB
§ Be open to the new concepts and paradigms offered by
MongoDB
§ The ‘Aha!’ moments will come in time – look for them!
§ Don’t be afraid to ask
§ Don’t Panic You Got This!
YOU
GOT
THIS!
Volume 4
In Which We Entertain Your Queries Questions
Thank you!!!
Eric Reid
eric.reid@mongodb.com
mongosilverback.net
YOU
GOT
THIS!
Attribution
§ Hitchhikers Guide to the Galaxy Characters
© Douglas Adams
§ Hitchhiker’s Guide to the Galaxy Icons
by Iconshock
§ Silverback Photo
© Kathmandutraveler - Dreamstime.com
MongoDB World 2019: Don't Panic - The Hitchhiker's Guide to the MongoDB Galaxy

More Related Content

Similar to MongoDB World 2019: Don't Panic - The Hitchhiker's Guide to the MongoDB Galaxy (20)

PDF
Building your first app with MongoDB
Norberto Leite
 
PPT
Planning JavaScript and Ajax for larger teams
Christian Heilmann
 
PDF
Leveling Up at JavaScript
Raymond Camden
 
PPTX
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
MongoDB
 
PPTX
Data oriented design and c++
Mike Acton
 
ODP
DrupalCon Chicago Practical MongoDB and Drupal
Doug Green
 
PPTX
All of Javascript
Togakangaroo
 
PPTX
Intro To Mongo Db
chriskite
 
PPTX
Social Analytics with MongoDB
Patrick Stokes
 
PPT
MongoDB Pros and Cons
johnrjenson
 
PDF
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon
 
PPTX
DevSecCon SG 2018 Fabian Presentation Slides
Fab L
 
PPTX
Ep keyote slides
Niti Suryawanshi
 
PPTX
Ep keyote slides
OpenEBS
 
PDF
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
CodeOps Technologies LLP
 
PDF
1428393873 mhkx3 ln
WilfredodelaCernaJr
 
PDF
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Milen Dyankov
 
KEY
MongoDB, E-commerce and Transactions
Steven Francia
 
PDF
Javaland 2017: "You´ll do microservices now". Now what?
André Goliath
 
PDF
Free The Enterprise With Ruby & Master Your Own Domain
Ken Collins
 
Building your first app with MongoDB
Norberto Leite
 
Planning JavaScript and Ajax for larger teams
Christian Heilmann
 
Leveling Up at JavaScript
Raymond Camden
 
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
MongoDB
 
Data oriented design and c++
Mike Acton
 
DrupalCon Chicago Practical MongoDB and Drupal
Doug Green
 
All of Javascript
Togakangaroo
 
Intro To Mongo Db
chriskite
 
Social Analytics with MongoDB
Patrick Stokes
 
MongoDB Pros and Cons
johnrjenson
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon
 
DevSecCon SG 2018 Fabian Presentation Slides
Fab L
 
Ep keyote slides
Niti Suryawanshi
 
Ep keyote slides
OpenEBS
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
CodeOps Technologies LLP
 
1428393873 mhkx3 ln
WilfredodelaCernaJr
 
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Milen Dyankov
 
MongoDB, E-commerce and Transactions
Steven Francia
 
Javaland 2017: "You´ll do microservices now". Now what?
André Goliath
 
Free The Enterprise With Ruby & Master Your Own Domain
Ken Collins
 

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
Ad

Recently uploaded (20)

PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Ad

MongoDB World 2019: Don't Panic - The Hitchhiker's Guide to the MongoDB Galaxy

  • 1. Eric Reid, Senior Consulting Engineer, MongoDB Don't Panic – The Hitchhiker's Guide to the MongoDB Galaxy
  • 2. Volume 1 In Which We Define the Context of This Talk
  • 3. The Hitchhiker’s Guide to the Galaxy Douglas Adams "The Guide is described as resembling 'a small, thin, flexible lap computer’ encased in a 'sturdy plastic cover' with the words 'Don't Panic' inscribed on it 'in large, friendly letters'. It is presumably of robust construction, making it able to withstand falling through time/space wormholes and being thrown into swamps, being rescued, and still operating.”
  • 4. A Slightly More Optimistic Message… YOU GOT THIS!
  • 5. % whoami Gorilla gorilla (lowland) Gorilla beringei (mountain) Great Ape Conservation Fund Part Silverback…
  • 6. % whoami 42Gorilla gorilla (lowland) Gorilla beringei (mountain) Great Ape Conservation Fund Part Silverback… Part Hitchhiker
  • 7. Welcome, Fellow Hitchhiker Is this you? § “I’ve been told I need to learn this MongoDB thing…” § “I want to learn MongoDB, but I don’t know where to start…” § “MongoDB seems to be expanding too fast to keep up with…” § “When I ask how to join tables in MongoDB, people snort…” § ”But, but, I’ve been using RDBMSs, like, forever !!!”
  • 8. Welcome, Fellow Hitchhiker Is this you? § “I’ve been told I need to learn this MongoDB thing…” § “I want to learn MongoDB, but I don’t know where to start…” § “MongoDB seems to be expanding too fast to keep up with…” § “When I ask how to join tables in MongoDB, people snort…” § ”But, but, I’ve been using RDBMSs forever !!!” YOU GOT THIS!
  • 9. Volume 2 In Which We Attempt to Assure You It’ll Be OK
  • 10. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013)
  • 11. Making Sense Of All Things Mongo Comparison: A Certain Red-ish, 40-year-old RDBMS § All since 1977
  • 12. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013) The MongoDB Community Open Source. Freely available for use. Thousands of users, millions of deployments. Server Community Edition
  • 13. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013) . Server Enterprise Edition MongoDB, Inc. Support. Best Practices. DBaaS. Enterprise functionality/features . Innovation. Atlas MongoDB Service
  • 14. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013) . Server Enterprise Edition MongoDB, Inc. Support. Best Practices. DBaaS. Enterprise functionality/features . Innovation. Atlas MongoDB Service BI Connector [connect to BI Tools]
  • 15. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013) . Server Enterprise Edition MongoDB, Inc. Support. Best Practices. DBaaS. Enterprise functionality/features . Innovation. Atlas MongoDB Service Ops Manager [on-prem mgmt] Cloud Manager [hosted mgmt] BI Connector [connect to BI Tools]
  • 16. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013) . Server Enterprise Edition MongoDB, Inc. Support. Best Practices. DBaaS. Enterprise functionality/features . Innovation. Atlas MongoDB Service Ops Manager [on-prem mgmt] Sync + Stitch [mobile / serverless] Cloud Manager [hosted mgmt] BI Connector [connect to BI Tools]
  • 17. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § All since 2007-2008 (really, since c. 2013) . Server Enterprise Edition MongoDB, Inc. Support. Best Practices. DBaaS. Enterprise functionality/features . Innovation. Atlas MongoDB Service Ops Manager [on-prem mgmt] Sync + Stitch [mobile / serverless] Cloud Manager [hosted mgmt] BI Connector [connect to BI Tools] Charts [built-in visualization]
  • 18. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § Too much stuff… panic… rising… = ?
  • 19. Making Sense Of All Things Mongo Our Rapidly Expanding Universe § Too much stuff… panic… rising… = ? YOU GOT THIS!
  • 20. Making Sense Of All Things Mongo Our Rapidly Expanding Universe Big MongoDB Rule: It’s OK (and often desirable) to Start Simply
  • 21. Volume 3 In Which We Enlighten Fellow Hitchhikers
  • 22. In Search of the ‘Aha!’ Moments The Story of the Data Designer who had to have a schema…
  • 23. In Search of the ‘Aha!’ Moments
  • 24. Top 5 Takeaways for new MongoDB Hitchhikers
  • 25. Top 5 Takeaways for new MongoDB Hitchhikers 1) MongoDB is proven for uses Big and Small
  • 26. Top 5 Takeaways for new MongoDB Hitchhikers 1) MongoDB is proven for uses Big and Small 2) One needn’t use (or even fully understand) the more complex pieces of MongoDB to use it well
  • 27. Top 5 Takeaways for new MongoDB Hitchhikers 1) MongoDB is proven for uses Big and Small 2) One needn’t use (or even fully understand) the more complex pieces of MongoDB to use it well 3) “Schemaless” is both a misnomer and an opportunity
  • 28. Top 5 Takeaways for new MongoDB Hitchhikers 1) MongoDB is proven for uses Big and Small 2) One needn’t use (or even fully understand) the more complex pieces of MongoDB to use it well 3) “Schemaless” is both a misnomer and an opportunity 4) New Hitchhikers need to check their preconceptions at the door
  • 29. Top 5 Takeaways for new MongoDB Hitchhikers 1) MongoDB is proven for uses Big and Small 2) One needn’t use (or even fully understand) the more complex pieces of MongoDB to use it well 3) “Schemaless” is both a misnomer and an opportunity 4) New Hitchhikers need to check their preconceptions at the door 5) Let your access patterns determine your data structure
  • 30. Making Sense Of All Things Mongo Start Simply and Locally • MongoDB Server on your {laptop,desktop}, plus Compass or MongoDB Shell • Be Careful: mongos is not the MongoDB Shell! • Be aware of MongoDB Shell database ‘context’ % mongo localhost:27017 > use myDatabase switched to db myDatabase > db.myCollection.insert({field:"this is in myDatabase.myCollection"}) WriteResult({ "nInserted" : 1 }) > use admin switched to db admin > db.myCollection.find() >
  • 31. Making Sense Of All Things Mongo Start Simply and Locally
  • 32. Making Sense Of All Things Mongo Start Simply and Locally • MongoDB Server on your {laptop,desktop}, plus Compass or MongoDB Shell
  • 33. Making Sense Of All Things Mongo Start Simply and Locally • MongoDB Server on your {laptop,desktop}, plus Compass or MongoDB Shell • Be Careful: mongos is not the MongoDB Shell
  • 34. Making Sense Of All Things Mongo Start Simply and Locally • MongoDB Server on your {laptop,desktop}, plus Compass or MongoDB Shell • Be Careful: mongos is not the MongoDB Shell! • Be aware of MongoDB Shell database ‘context’ % mongo localhost:27017 > use myDatabase switched to db myDatabase > db.myCollection.insert({field:"this is in myDatabase.myCollection"}) WriteResult({ "nInserted" : 1 }) > use admin switched to db admin > db.myCollection.find() >
  • 35. Making Sense Of All Things Mongo Coming From RDBMS-land?
  • 36. Making Sense Of All Things Mongo Coming From RDBMS-land?
  • 38. Jumping In Data Design § Access patterns drive MongoDB data design
  • 39. Jumping In Data Design § Access patterns drive MongoDB data design § Collection definition cannot be done in a vacuum § First: “What are the main types of things in your database?” § Then: “What are your apps’ most important queries?” § Then: “What are your apps’ most important writes?”
  • 40. Jumping In Data Design § Access patterns drive MongoDB data design § Collection definition cannot be done in a vacuum § First: “What are the main types of things in your database?” § Then: “What are your apps’ most important queries?” § Then: “What are your apps’ most important writes?” § Never, never, never, never, never expect to port an app from an RDBMS with a 1:1 mapping from tables to collections
  • 41. Jumping In Data Design § Access patterns drive MongoDB data design § Collection definition cannot be done in a vacuum § First: “What are the main types of things in your database?” § Then: “What are your apps’ most important queries?” § Then: “What are your apps’ most important writes?” § Never, never, never, never, never expect to port an app from an RDBMS with a 1:1 mapping from tables to collections § Know thy working set
  • 42. “If I’d Only Known…” Tales from the Road Warrior
  • 43. “If I’d Only Known…” Tales from the Road Warrior § MongoDB Shell is a JavaScript interpreter! > for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) } { "acknowledged" : true, "insertedId" : 20 }
  • 44. “If I’d Only Known…” Tales from the Road Warrior § MongoDB Shell is a JavaScript interpreter! § MongoDB Shell has shortcuts > for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) } { "acknowledged" : true, "insertedId" : 20 }
  • 45. “If I’d Only Known…” Tales from the Road Warrior § MongoDB Shell is a JavaScript interpreter! § MongoDB Shell has shortcuts § Don’t try to be overly clever with Boolean values § {$ne: true} is not the same as {$eq: false} > for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) } { "acknowledged" : true, "insertedId" : 20 }
  • 46. “If I’d Only Known…” Tales from the Road Warrior § MongoDB Shell is a JavaScript interpreter! § MongoDB Shell has shortcuts § Don’t try to be overly clever with Boolean values § {$ne: true} is not the same as {$eq: false} § Copy-and-Paste can introduce “smart quotes”; MongoDB Shell doesn’t like “smart quotes” > for (i=1; i<=20; i++) { db.testcol.insertOne( { _id : i, a : i } ) } { "acknowledged" : true, "insertedId" : 20 }
  • 47. And now, Eric’s ‘Aha!’ Moment… The story of bindIp
  • 48. And now, Eric’s ‘Aha!’ Moment… The story of bindIp net: port: 27017 bindIp: 127.0.0.1, 192.168.0.101 mongod.conf
  • 49. Tools for Your MongoDB Life
  • 50. Tools for Your MongoDB Life m § https://github.com/aheckmann/m § Manage multiple versions of MongoDB, quickly switch between them § Used for: local sandboxes $ m 4.0.5-ent ο 4.0.8 4.0.9 $ m 4.0.9 Activating 4.0.9 $ mongod --version db version v4.0.9
  • 51. Tools for Your MongoDB Life mtools § https://github.com/rueckstiess/mto ols § a) Log analysis and visualization of any mongod logfile § b) mlaunch quick spin-up script; Stand up local test Standalone, Replica Set, or Sharded Cluster in seconds $ mlaunch init --replicaset -- sharded 3 launching: "mongod" on port 27018 launching: "mongod" on port 27019 : :
  • 52. Tools for Your MongoDB Life mgeneratejs § https://github.com/rueckstiess/mgeneratejs § Generate semi-structured JSON for import w/mongoimport § Used for: any instance $ mgeneratejs '{"name": "$name", "age": "$age", "emails": {"$array": {"of": "$email", "number": 3}}}' -n 1000000 > collectionData.json $ mongoimport –d test –c myCollection collectionData.json 2019-04-18T17:31:26.922-0400 connected to: localhost 2019-04-18T17:32:57.893-0400 imported 1000000 documents
  • 53. O, Where to Turn? Community Resources for MongoDB Novitiate
  • 54. O, Where to Turn? Community Resources for MongoDB Novitiate § The MongoDB Slack Community is the place to meet other users, learn, and get answers to questions.
  • 55. O, Where to Turn? Community Resources for MongoDB Novitiate § The MongoDB Slack Community is the place to meet other users, learn, and get answers to questions. § MongoDB-User Community Support Forum: A community forum best suited for open-ended, opinion-based, or general questions about MongoDB. You can post and view the forum via the Google Groups web interface or subscribe to updates via email.
  • 56. O, Where to Turn? Community Resources for MongoDB Novitiate § The MongoDB Slack Community is the place to meet other users, learn, and get answers to questions. § MongoDB-User Community Support Forum: A community forum best suited for open-ended, opinion-based, or general questions about MongoDB. You can post and view the forum via the Google Groups web interface or subscribe to updates via email. § Stack Overflow: A community Q&A site for specific programming questions with factual, rather than subjective, answers
  • 57. O, Where to Turn? Community Resources for MongoDB Novitiate § The MongoDB Slack Community is the place to meet other users, learn, and get answers to questions. § MongoDB-User Community Support Forum: A community forum best suited for open-ended, opinion-based, or general questions about MongoDB. You can post and view the forum via the Google Groups web interface or subscribe to updates via email. § Stack Overflow: A community Q&A site for specific programming questions with factual, rather than subjective, answers § DBA Stack Exchange: A community Q&A site for database administrators and other database professionals.
  • 58. O, Where to Turn? Enterprise Resources for MongoDB Novitiate
  • 59. O, Where to Turn? Enterprise Resources for MongoDB Novitiate § MongoDB Technical Support provides Enterprise Customers with timely technical support for MongoDB products
  • 60. O, Where to Turn? Enterprise Resources for MongoDB Novitiate § MongoDB Technical Support provides Enterprise Customers with timely technical support for MongoDB products § MongoDB Professional Services gives Customers access to world class MongoDB Best Practices and expertise on-site
  • 61. O, Where to Turn? Enterprise Resources for MongoDB Novitiate § MongoDB Technical Support provides Enterprise Customers with timely technical support for MongoDB products § MongoDB Professional Services gives Customers access to world class MongoDB Best Practices and expertise on-site § MongoDB University serves up free self-paced or instructor-paced virtual courses, and offers MongoDB Admin and Developer Certifications
  • 63. Summing Up § It’s OK to start simply with MongoDB
  • 64. Summing Up § It’s OK to start simply with MongoDB § Be open to the new concepts and paradigms offered by MongoDB
  • 65. Summing Up § It’s OK to start simply with MongoDB § Be open to the new concepts and paradigms offered by MongoDB § The ‘Aha!’ moments will come in time – look for them!
  • 66. Summing Up § It’s OK to start simply with MongoDB § Be open to the new concepts and paradigms offered by MongoDB § The ‘Aha!’ moments will come in time – look for them! § Don’t be afraid to ask
  • 67. Summing Up § It’s OK to start simply with MongoDB § Be open to the new concepts and paradigms offered by MongoDB § The ‘Aha!’ moments will come in time – look for them! § Don’t be afraid to ask § Don’t Panic You Got This! YOU GOT THIS!
  • 68. Volume 4 In Which We Entertain Your Queries Questions
  • 70. Attribution § Hitchhikers Guide to the Galaxy Characters © Douglas Adams § Hitchhiker’s Guide to the Galaxy Icons by Iconshock § Silverback Photo © Kathmandutraveler - Dreamstime.com