SlideShare a Scribd company logo
Introduction to
MongoDB
Faro Dev Day 16
Mwai Karimi
@openbk
/kmwai
Agenda
Intro
Concepts & Rationale
● What is Mongodb, evolution,
Key Features
● Internals, crud operations, data management, security, provisioning and
disaster recovery
About me
Student
Web developer, tech enthusiast
Ardent foodie, travel junkie
Passionate about women empowerment & History
Concepts & Rationale
● Hardware - Parallelism (cores / servers / Cloud Computing / Distributed
computing)
● Scale up -> “Big data”
● Make app dev easier & elegant
○ Complex structure, unstructured, polymorphic
Scaling / dev Speed / Complex data
Scale Out
What is MongoDB
• Scalable High-Performance Open-source, Document-oriented database.
• Built for Speed
• Rich Document based queries for easy readability.
• Full Index Support for High Performance.
• Replication and Failover for High Availability.
• Auto Sharding for Easy Scalability.
• Map / Reduce for Aggregation.
Support for multiple storage engines
Why Documents?
● Documents (i.e. objects) correspond to native data types in many
programming languages.
● Embedded documents and arrays reduce need for expensive joins.
● Dynamic schema supports fluent polymorphism.
Introduction to mongo db
Driver support
C, C++, Java, PHP, Python, Node, Pearl, Ruby, Motor, Erlang
Internals
Database - database
● Made up of multiple collections
● Created on the fly when referenced for the first time
Collection - Table
● Schemaless - Contains documents
● Indexable
● Created on the fly when referenced
Document - Row
● Stored in a collection
● Have _id - similar to primary keys
● Supports Relationships (embedded / referenced)
● Stored in BSON (Binary JSON)
internals
Restrictions
● The field name _id is reserved for use as a primary key; its value must be unique in the collection, is immutable, and
may be of any type other than an array.
● The field names cannot start with the dollar sign ($) character.
● The field names cannot contain the dot (.) character.
● The field names cannot contain the null character.
CRUD Operations
Create - Create or insert operations add new documents to a collection. If the
collection does not currently exist, insert operations will create the collection.
MongoDB provides the following methods to insert documents into a collection:
● db.collection.insert()
● db.collection.insertOne() New in version 3.2
● db.collection.insertMany() New in version 3.2
CRUD Operations
Read operations retrieves documents from a collection; i.e. queries a collection for
documents. MongoDB provides the following methods to read documents from a
collection:
● db.collection.find()
CRUD Operations
Update operations modify existing documents in a collection. MongoDB provides
the following methods to update documents of a collection:
● db.collection.update()
● db.collection.updateOne() New in version 3.2
● db.collection.updateMany() New in version 3.2
● db.collection.replaceOne() New in version 3.2
CRUD Operations
Delete operations remove documents from a collection. MongoDB provides the
following methods to delete documents of a collection:
● db.collection.remove()
● db.collection.deleteOne() New in version 3.2
● db.collection.deleteMany() New in version 3.2
Data Management
● Auto-Sharding (sharding) - automatically balances the data in the sharded
cluster as the data grows or the size of the cluster increases or decreases.
○ Range based - docs partitioned across shards according to the shard key value
○ Hash based - “ “ according to the MD5 hash of the shard key value
○ Zone Sharding - provides dba & ops teams w/ opportunities to define rules governing data
placement in a sharded cluster
● Availability - through Replication (replica sets)
○ Replica failover fully automated
○ No. of replica sets fully configurable (up to 50) - allows for data durability in case of failures
○ Replica sets allow for operational flexibility - db does not need to be taken offline
○ Allows for tunable consistency - apps reading from secondaries (data is consistent by default)
Security
● Authentication - integration w/ LDAP, Kerberos
● Authorisation - admins can define user-based roles
● Auditing - audit log to track any op taken against the db
● Encryption - Data can be encrypted on the network, disk & in back ups
Provisioning, Monitoring and Disaster Recovery
Made possible by the Mongodb Ops Manager
● Deployment - Any topology, at any scale
● Upgrade - In minutes, with no downtime
● Scale - Add capacity, without taking the application offline
● Visualize - Graphically display query performance to identify and fix slow
running operations
● Point-in-time, Scheduled backups - restore complete running clusters to
any point in time with just a few clicks, because disasters aren't predictable
● Performance Alerts - Monitor 100+ system metrics and get custom alerts
before the system degrades.
MongoDB Atlas
DB as a service
Automated operations - deploy in minutes
Elastic - easy to scale up or out
Performance metrics in real time
Resources
Case studies - (mongodb.com/customers)
Documentation - (docs.mongodb.com)
MongoDB Enterprise download - mongodb.com/download
MongoDB Atlas - (mongodb.com/cloud/atlas)

More Related Content

What's hot (20)

PDF
Clique square storage
INRIA-OAK
 
PPT
Large-scale projects development (scaling LAMP)
Alexey Rybak
 
PPT
MongoDb - Details on the POC
Amardeep Vishwakarma
 
PPTX
Cassandra Lunch #59 Functions in Cassandra
Anant Corporation
 
PDF
What Reika Taught us
University of California, Santa Cruz
 
ODP
Lcna example-2012
Gluster.org
 
PPTX
Dynamo db and Cross Region Migration
Anamika Gupta
 
PDF
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
IndicThreads
 
PDF
Mongo presentation conf
Shridhar Joshi
 
PDF
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
MongoDB
 
PPTX
Mongo DB 102
Abhijeet Vaikar
 
ODP
BaseX user-group-talk XML Prague 2013
Andy Bunce
 
PDF
.NET Memory Primer (Martin Kulov)
ITCamp
 
PDF
Improve Presto Architectural Decisions with Shadow Cache
Alluxio, Inc.
 
ODP
Gsummit apis-2013
Gluster.org
 
PDF
Updating materialized views and caches using kafka
Zach Cox
 
PDF
21st Athens Big Data Meetup - 1st Talk - Fast and simple data exploration wit...
Athens Big Data
 
PPTX
MongoDB Aggregation MongoSF May 2011
Chris Westin
 
PDF
Features of couchDB
Javatpoint
 
PPTX
Distcp gobblin
Vasanth Rajamani
 
Clique square storage
INRIA-OAK
 
Large-scale projects development (scaling LAMP)
Alexey Rybak
 
MongoDb - Details on the POC
Amardeep Vishwakarma
 
Cassandra Lunch #59 Functions in Cassandra
Anant Corporation
 
Lcna example-2012
Gluster.org
 
Dynamo db and Cross Region Migration
Anamika Gupta
 
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
IndicThreads
 
Mongo presentation conf
Shridhar Joshi
 
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
MongoDB
 
Mongo DB 102
Abhijeet Vaikar
 
BaseX user-group-talk XML Prague 2013
Andy Bunce
 
.NET Memory Primer (Martin Kulov)
ITCamp
 
Improve Presto Architectural Decisions with Shadow Cache
Alluxio, Inc.
 
Gsummit apis-2013
Gluster.org
 
Updating materialized views and caches using kafka
Zach Cox
 
21st Athens Big Data Meetup - 1st Talk - Fast and simple data exploration wit...
Athens Big Data
 
MongoDB Aggregation MongoSF May 2011
Chris Westin
 
Features of couchDB
Javatpoint
 
Distcp gobblin
Vasanth Rajamani
 

Similar to Introduction to mongo db (20)

PPTX
Introduction to MongoDB a brief intro(1).pptx
mehfooz968268
 
PPTX
MongoDB - A next-generation database that lets you create applications never ...
Ram Murat Sharma
 
PDF
Mongodb The Definitive Guide 3rd Edition 3rd Edition Kristina Chodorow Eoin B...
ikareugine
 
PPTX
How to learn MongoDB for beginner's
surajkumartpoint
 
PPTX
MongoDB presentation
Hyphen Call
 
PPTX
Introduction To MongoDB
ElieHannouch
 
PDF
MongoDB - An Introduction
sethfloydjr
 
PPT
Introduction to Mongodb
Tulbendra Singh yadav
 
PPTX
MongoDB 3.0
Victoria Malaya
 
PPTX
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
PPTX
DBVersity MongoDB Online Training Presentations
Srinivas Mutyala
 
PPTX
MongoDB Internals
Siraj Memon
 
PPTX
Conceptos básicos. Seminario web 6: Despliegue de producción
MongoDB
 
PPTX
Mongo db intro.pptx
JWORKS powered by Ordina
 
PPTX
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
PPTX
MongoDB for Beginners
Enoch Joshua
 
PPTX
MongoDB Deployment Checklist
MongoDB
 
PPTX
Mongodb Introduction
Nabeel Naqeebi
 
PPTX
MongoDB Workshop Universidad de Huelva
Juan Antonio Roy Couto
 
PDF
Mongodb
Apurva Vyas
 
Introduction to MongoDB a brief intro(1).pptx
mehfooz968268
 
MongoDB - A next-generation database that lets you create applications never ...
Ram Murat Sharma
 
Mongodb The Definitive Guide 3rd Edition 3rd Edition Kristina Chodorow Eoin B...
ikareugine
 
How to learn MongoDB for beginner's
surajkumartpoint
 
MongoDB presentation
Hyphen Call
 
Introduction To MongoDB
ElieHannouch
 
MongoDB - An Introduction
sethfloydjr
 
Introduction to Mongodb
Tulbendra Singh yadav
 
MongoDB 3.0
Victoria Malaya
 
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
DBVersity MongoDB Online Training Presentations
Srinivas Mutyala
 
MongoDB Internals
Siraj Memon
 
Conceptos básicos. Seminario web 6: Despliegue de producción
MongoDB
 
Mongo db intro.pptx
JWORKS powered by Ordina
 
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
MongoDB for Beginners
Enoch Joshua
 
MongoDB Deployment Checklist
MongoDB
 
Mongodb Introduction
Nabeel Naqeebi
 
MongoDB Workshop Universidad de Huelva
Juan Antonio Roy Couto
 
Mongodb
Apurva Vyas
 
Ad

Recently uploaded (20)

PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Digital Circuits, important subject in CS
contactparinay1
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Ad

Introduction to mongo db

  • 1. Introduction to MongoDB Faro Dev Day 16 Mwai Karimi @openbk /kmwai
  • 2. Agenda Intro Concepts & Rationale ● What is Mongodb, evolution, Key Features ● Internals, crud operations, data management, security, provisioning and disaster recovery
  • 3. About me Student Web developer, tech enthusiast Ardent foodie, travel junkie Passionate about women empowerment & History
  • 4. Concepts & Rationale ● Hardware - Parallelism (cores / servers / Cloud Computing / Distributed computing) ● Scale up -> “Big data” ● Make app dev easier & elegant ○ Complex structure, unstructured, polymorphic Scaling / dev Speed / Complex data
  • 6. What is MongoDB • Scalable High-Performance Open-source, Document-oriented database. • Built for Speed • Rich Document based queries for easy readability. • Full Index Support for High Performance. • Replication and Failover for High Availability. • Auto Sharding for Easy Scalability. • Map / Reduce for Aggregation. Support for multiple storage engines
  • 7. Why Documents? ● Documents (i.e. objects) correspond to native data types in many programming languages. ● Embedded documents and arrays reduce need for expensive joins. ● Dynamic schema supports fluent polymorphism.
  • 9. Driver support C, C++, Java, PHP, Python, Node, Pearl, Ruby, Motor, Erlang
  • 10. Internals Database - database ● Made up of multiple collections ● Created on the fly when referenced for the first time Collection - Table ● Schemaless - Contains documents ● Indexable ● Created on the fly when referenced Document - Row ● Stored in a collection ● Have _id - similar to primary keys ● Supports Relationships (embedded / referenced) ● Stored in BSON (Binary JSON)
  • 11. internals Restrictions ● The field name _id is reserved for use as a primary key; its value must be unique in the collection, is immutable, and may be of any type other than an array. ● The field names cannot start with the dollar sign ($) character. ● The field names cannot contain the dot (.) character. ● The field names cannot contain the null character.
  • 12. CRUD Operations Create - Create or insert operations add new documents to a collection. If the collection does not currently exist, insert operations will create the collection. MongoDB provides the following methods to insert documents into a collection: ● db.collection.insert() ● db.collection.insertOne() New in version 3.2 ● db.collection.insertMany() New in version 3.2
  • 13. CRUD Operations Read operations retrieves documents from a collection; i.e. queries a collection for documents. MongoDB provides the following methods to read documents from a collection: ● db.collection.find()
  • 14. CRUD Operations Update operations modify existing documents in a collection. MongoDB provides the following methods to update documents of a collection: ● db.collection.update() ● db.collection.updateOne() New in version 3.2 ● db.collection.updateMany() New in version 3.2 ● db.collection.replaceOne() New in version 3.2
  • 15. CRUD Operations Delete operations remove documents from a collection. MongoDB provides the following methods to delete documents of a collection: ● db.collection.remove() ● db.collection.deleteOne() New in version 3.2 ● db.collection.deleteMany() New in version 3.2
  • 16. Data Management ● Auto-Sharding (sharding) - automatically balances the data in the sharded cluster as the data grows or the size of the cluster increases or decreases. ○ Range based - docs partitioned across shards according to the shard key value ○ Hash based - “ “ according to the MD5 hash of the shard key value ○ Zone Sharding - provides dba & ops teams w/ opportunities to define rules governing data placement in a sharded cluster ● Availability - through Replication (replica sets) ○ Replica failover fully automated ○ No. of replica sets fully configurable (up to 50) - allows for data durability in case of failures ○ Replica sets allow for operational flexibility - db does not need to be taken offline ○ Allows for tunable consistency - apps reading from secondaries (data is consistent by default)
  • 17. Security ● Authentication - integration w/ LDAP, Kerberos ● Authorisation - admins can define user-based roles ● Auditing - audit log to track any op taken against the db ● Encryption - Data can be encrypted on the network, disk & in back ups
  • 18. Provisioning, Monitoring and Disaster Recovery Made possible by the Mongodb Ops Manager ● Deployment - Any topology, at any scale ● Upgrade - In minutes, with no downtime ● Scale - Add capacity, without taking the application offline ● Visualize - Graphically display query performance to identify and fix slow running operations ● Point-in-time, Scheduled backups - restore complete running clusters to any point in time with just a few clicks, because disasters aren't predictable ● Performance Alerts - Monitor 100+ system metrics and get custom alerts before the system degrades.
  • 19. MongoDB Atlas DB as a service Automated operations - deploy in minutes Elastic - easy to scale up or out Performance metrics in real time
  • 20. Resources Case studies - (mongodb.com/customers) Documentation - (docs.mongodb.com) MongoDB Enterprise download - mongodb.com/download MongoDB Atlas - (mongodb.com/cloud/atlas)