SlideShare a Scribd company logo
1 of 45
Jumpstart! Your Introduction
to MongoDB
Nathan Leniz, Senior Engineer, MongoDB
Why am I here?
About a decade ago, 3 guys with a lot of industry experience got together and thought
“There must be a better way”. A better way to store data, more intuitive, more natural…
- or -
You came for the beard.
Agenda
What is MongoDB?
Document Model
Query Language
Resiliency
MongoDB Ecosystem
Demo
Nathan Leniz
Senior Engineer
About Me
I’m a Senior Engineer on the Education team at MongoDB.
I built the course on MongoDB’s Aggregation Framework, as well as using Aggregation in data science workflows
using SKLearn. Currently working on the new generation of developer courses on MongoDB University.
In a previous life, I disarmed bombs for the U.S. Army. The Hurt Locker used a lot of artistic license and
exaggerated circumstances, but captured what life was like pretty well.
What is MongoDB?
What is MongoDB?
MongoDB is a cross-platform and open-source document-oriented database general purpose database. As a
document database, MongoDB doesn’t use table-based structure, rather it uses JSON-like documents that have
dynamic schemas which it calls BSON.
Please keep in mind that NoSQL does not mean no relationships!
What is MongoDB?
Written in C++, C, Go, and Javascript
Source and binary packages are available for download at mongodb.com/downloads
SSPL License
Ready for deployment in the cloud or on bare metal
What is MongoDB?
MongoDB was written to make it simple to store data.
• {"Key": "Value"}
Documents map naturally to common data structures in most popular programming languages
Schemas are dynamic. There’s no need for expensive migrations.
As new data is encountered, just store it. If the shape of data needs to change, then change it.
What is MongoDB?
MongoDB is an ecosystem of products, including a database, visual data explorer, platform, and analytics tools to
make it easier than ever to develop your applications.
Document Model
Document Model
Not just key-
valueMongoDB’s document model is not just a key-value
store.
Rich document composition is possible, and
encouraged.
Store embedded objects, arrays, rich data types, and
more.
{
"title": "The Martian",
"year": 2015,
"runtime": 130,
"released": ISODate("2015-10-
02T00:00:00Z"),
"cast": [
"Kate Mara",
"Matt Damon",
"Jessica Chastain",
"Kristen Wiig"
]
}
Document Model
MongoDB RDBMS
Database Database
Collection Table
Index Index
Document Row
Field Column
Embedding, Linking, $lookup Join
Document Model
Document Model
It’s a natural way to think about data, and maps incredibly well to patterns we know and common types and
structures we use daily.
Query Language
MQL and Aggregation
Query Language
CREATE TABLE movies (
id MEDIUMINT NOT NULL
AUTO_INCREMENT,
title Varchar(30),
year Number,
rating Number,
PRIMARY KEY (id)
)
db.createCollection("movies")
Query Language
INSERT INTO movies(title,
year, rating) VALUES ("The
Shawshank Redemption", 10,
1994)
db.movies.insertOne({title:
"The Shawshank Redemption",
year: 1994, rating: 10})
Query Language
ALTER TABLE movies ADD cast
ARRAY
UPDATE movies SET cast =
["Morgan Freeman", "Tim
Robbins"] WHERE title = "The
Shawshank Redemption"
db.movies.updateOne(
{title: "The Shawshank
Redemption"},
{$set: { "cast": ["Morgan
Freeman", "Tim Robbins" ] } }
)
Query Language
ALTER TABLE movies ADD cast
ARRAY
UPDATE movies SET cast =
["Morgan Freeman", "Tim
Robbins"] WHERE title = "The
Shawshank Redemption"
db.movies.updateOne(
{title: "The Shawshank
Redemption"},
{$set: { "cast": ["Morgan
Freeman", "Tim Robbins" ] } }
)
Query Language
SELECT * FROM movies
SELECT * FROM movies WHERE
rating > 7
SELECT * FROM movies WHERE
rating > 7 LIMIT 1
SELECT * FROM movies WHERE
rating > 7 AND year > 1990
??
db.movies.find()
db.movies.find({rating: { $gt:
7 }})
db.movies.findOne({rating: {
$gt: 7 }})
db.movies.find({rating: { $gt:
7 }, year: { $gt: 1990 } })
db.movies.find({cast: "Morgan
Freeman"})
Query Language
CREATE INDEX
idx_movie_rating_desc ON
movies(rating DESC)
db.movies.createIndex({ rating:
-1 })
Query Language - Performance
Indexes support the efficient execution of queries in MongoDB.
Many index types
• Single Field
• Multikey
• Text
• Geospatial
• Hashed
• Compound
Query Language - Aggregation
A framework for data aggregation modeled on the concept of data processing pipelines.
Documents enter a multi-stage pipeline that transforms the documents into aggregated results.
Reduce the CPU cycles in processing your app, let MongoDB handle aggregation.
Results produced from aggregation lower in total byte size of your data, saving bandwidth.
Query Language - Aggregation
A framework for data aggregation modeled on the concept of data processing pipelines.
Documents enter a multi-stage pipeline that transforms the documents into aggregated results.
Query Language
Expressive
Intuitive
Familiar
Resiliency
Resiliency – The Replica Set
Resiliency – The Replica Set
Your application talks to MongoDB through the
driver, which is constantly monitoring your replica
set health.
Internally, the replica set is monitoring health as
well, ready to react in case of emergency.
Resiliency - Reacting
MongoDB Ecosystem
MongoDB Ecosystem
Compass
Atlas
Stitch
Charts
Ops Manager
Cloud Manager
Ecosystem - Compass
MongoDB’s GUI to explore and interact with your data.
Ecosystem - Atlas
Atlas – Built in Security
TLS/SSL
Authentication and Authorization
IP Whitelists
User roles
VPC Peering (AWS)
AES-256 hardware encryption
Atlas – Graphs and Metrics
MongoDB
Hardware
Utilization
Performance
Atlas – Real Time Performance
Atlas – So Much More
Monitoring and Alerting
• Supports Third-Party integration
• Webhooks
• Email
• SMS
• PagerDuty
• Slack
Live Migration
Backups and Recovery
BI Connector
Ecosystem - Stitch
Ecosystem - Charts
Live Coding
Typing accuracy and mental faculty guaranteed to reduce by 37%!
Thank You!
Jumpstart: Building Your First MongoDB App

More Related Content

What's hot

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Justin Smestad
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB Tutorial
Steven Francia
 

What's hot (20)

MongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by Examples
 
Introduction to mongoDB
Introduction to mongoDBIntroduction to mongoDB
Introduction to mongoDB
 
MongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBookMongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBook
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Mango Database - Web Development
Mango Database - Web DevelopmentMango Database - Web Development
Mango Database - Web Development
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Webinar: What's new in the .NET Driver
Webinar: What's new in the .NET DriverWebinar: What's new in the .NET Driver
Webinar: What's new in the .NET Driver
 
MongoDB
MongoDBMongoDB
MongoDB
 
Introduction to MongoDB (Webinar Jan 2011)
Introduction to MongoDB (Webinar Jan 2011)Introduction to MongoDB (Webinar Jan 2011)
Introduction to MongoDB (Webinar Jan 2011)
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB Tutorial
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.
 
Mongodb
MongodbMongodb
Mongodb
 
MongoDB and Schema Design
MongoDB and Schema DesignMongoDB and Schema Design
MongoDB and Schema Design
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 

Similar to Jumpstart: Building Your First MongoDB App

Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
 
MongoDB_Sharan_Prakash_Babu
MongoDB_Sharan_Prakash_BabuMongoDB_Sharan_Prakash_Babu
MongoDB_Sharan_Prakash_Babu
Sharan
 

Similar to Jumpstart: Building Your First MongoDB App (20)

MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
Elasticsearch vs MongoDB comparison
Elasticsearch vs MongoDB comparisonElasticsearch vs MongoDB comparison
Elasticsearch vs MongoDB comparison
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answers
 
Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptx
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongodb Introduction
Mongodb Introduction Mongodb Introduction
Mongodb Introduction
 
Webinar: Live Data Visualisation with Tableau and MongoDB
Webinar: Live Data Visualisation with Tableau and MongoDBWebinar: Live Data Visualisation with Tableau and MongoDB
Webinar: Live Data Visualisation with Tableau and MongoDB
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQL
 
MongoDB_Sharan_Prakash_Babu
MongoDB_Sharan_Prakash_BabuMongoDB_Sharan_Prakash_Babu
MongoDB_Sharan_Prakash_Babu
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
 

More from MongoDB

More from MongoDB (20)

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

Recently uploaded

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Jumpstart: Building Your First MongoDB App

  • 1.
  • 2. Jumpstart! Your Introduction to MongoDB Nathan Leniz, Senior Engineer, MongoDB
  • 3. Why am I here? About a decade ago, 3 guys with a lot of industry experience got together and thought “There must be a better way”. A better way to store data, more intuitive, more natural… - or - You came for the beard.
  • 4. Agenda What is MongoDB? Document Model Query Language Resiliency MongoDB Ecosystem Demo
  • 6. About Me I’m a Senior Engineer on the Education team at MongoDB. I built the course on MongoDB’s Aggregation Framework, as well as using Aggregation in data science workflows using SKLearn. Currently working on the new generation of developer courses on MongoDB University. In a previous life, I disarmed bombs for the U.S. Army. The Hurt Locker used a lot of artistic license and exaggerated circumstances, but captured what life was like pretty well.
  • 8. What is MongoDB? MongoDB is a cross-platform and open-source document-oriented database general purpose database. As a document database, MongoDB doesn’t use table-based structure, rather it uses JSON-like documents that have dynamic schemas which it calls BSON. Please keep in mind that NoSQL does not mean no relationships!
  • 9. What is MongoDB? Written in C++, C, Go, and Javascript Source and binary packages are available for download at mongodb.com/downloads SSPL License Ready for deployment in the cloud or on bare metal
  • 10. What is MongoDB? MongoDB was written to make it simple to store data. • {"Key": "Value"} Documents map naturally to common data structures in most popular programming languages Schemas are dynamic. There’s no need for expensive migrations. As new data is encountered, just store it. If the shape of data needs to change, then change it.
  • 11. What is MongoDB? MongoDB is an ecosystem of products, including a database, visual data explorer, platform, and analytics tools to make it easier than ever to develop your applications.
  • 14. Not just key- valueMongoDB’s document model is not just a key-value store. Rich document composition is possible, and encouraged. Store embedded objects, arrays, rich data types, and more. { "title": "The Martian", "year": 2015, "runtime": 130, "released": ISODate("2015-10- 02T00:00:00Z"), "cast": [ "Kate Mara", "Matt Damon", "Jessica Chastain", "Kristen Wiig" ] }
  • 15. Document Model MongoDB RDBMS Database Database Collection Table Index Index Document Row Field Column Embedding, Linking, $lookup Join
  • 17. Document Model It’s a natural way to think about data, and maps incredibly well to patterns we know and common types and structures we use daily.
  • 18. Query Language MQL and Aggregation
  • 19. Query Language CREATE TABLE movies ( id MEDIUMINT NOT NULL AUTO_INCREMENT, title Varchar(30), year Number, rating Number, PRIMARY KEY (id) ) db.createCollection("movies")
  • 20. Query Language INSERT INTO movies(title, year, rating) VALUES ("The Shawshank Redemption", 10, 1994) db.movies.insertOne({title: "The Shawshank Redemption", year: 1994, rating: 10})
  • 21. Query Language ALTER TABLE movies ADD cast ARRAY UPDATE movies SET cast = ["Morgan Freeman", "Tim Robbins"] WHERE title = "The Shawshank Redemption" db.movies.updateOne( {title: "The Shawshank Redemption"}, {$set: { "cast": ["Morgan Freeman", "Tim Robbins" ] } } )
  • 22. Query Language ALTER TABLE movies ADD cast ARRAY UPDATE movies SET cast = ["Morgan Freeman", "Tim Robbins"] WHERE title = "The Shawshank Redemption" db.movies.updateOne( {title: "The Shawshank Redemption"}, {$set: { "cast": ["Morgan Freeman", "Tim Robbins" ] } } )
  • 23. Query Language SELECT * FROM movies SELECT * FROM movies WHERE rating > 7 SELECT * FROM movies WHERE rating > 7 LIMIT 1 SELECT * FROM movies WHERE rating > 7 AND year > 1990 ?? db.movies.find() db.movies.find({rating: { $gt: 7 }}) db.movies.findOne({rating: { $gt: 7 }}) db.movies.find({rating: { $gt: 7 }, year: { $gt: 1990 } }) db.movies.find({cast: "Morgan Freeman"})
  • 24. Query Language CREATE INDEX idx_movie_rating_desc ON movies(rating DESC) db.movies.createIndex({ rating: -1 })
  • 25. Query Language - Performance Indexes support the efficient execution of queries in MongoDB. Many index types • Single Field • Multikey • Text • Geospatial • Hashed • Compound
  • 26. Query Language - Aggregation A framework for data aggregation modeled on the concept of data processing pipelines. Documents enter a multi-stage pipeline that transforms the documents into aggregated results. Reduce the CPU cycles in processing your app, let MongoDB handle aggregation. Results produced from aggregation lower in total byte size of your data, saving bandwidth.
  • 27. Query Language - Aggregation A framework for data aggregation modeled on the concept of data processing pipelines. Documents enter a multi-stage pipeline that transforms the documents into aggregated results.
  • 30. Resiliency – The Replica Set
  • 31. Resiliency – The Replica Set Your application talks to MongoDB through the driver, which is constantly monitoring your replica set health. Internally, the replica set is monitoring health as well, ready to react in case of emergency.
  • 35. Ecosystem - Compass MongoDB’s GUI to explore and interact with your data.
  • 37. Atlas – Built in Security TLS/SSL Authentication and Authorization IP Whitelists User roles VPC Peering (AWS) AES-256 hardware encryption
  • 38. Atlas – Graphs and Metrics MongoDB Hardware Utilization Performance
  • 39. Atlas – Real Time Performance
  • 40. Atlas – So Much More Monitoring and Alerting • Supports Third-Party integration • Webhooks • Email • SMS • PagerDuty • Slack Live Migration Backups and Recovery BI Connector
  • 43. Live Coding Typing accuracy and mental faculty guaranteed to reduce by 37%!