SlideShare a Scribd company logo
MongoDB
Justin Smestad


@jsmestad
justin@mongomachine.com
whoami

Software Engineer (Ruby, Javascript, and Clojure)
User Experience & Design on the side
Passion for DevOps
Chicagoland native
whoami

Software Engineer (Ruby, Javascript, and Clojure)
User Experience & Design on the side
Passion for DevOps
Chicagoland native
whoami

Software Engineer (Ruby, Javascript, and Clojure)
User Experience & Design on the side
Passion for DevOps
Chicagoland native
whoami

Software Engineer (Ruby, Javascript, and Clojure)
User Experience & Design on the side
Passion for DevOps
Chicagoland native
Background
Java Engineer @ Orbitz Worldwide
  Brought Ruby and RSpec/Cucumber to replace
  Fitness Testing
Application Developer @ Factory Design Labs
  Brand & Campaign sites for Audi, Oakley, and TNF
Independent Contractor
  Development team for TechStars alumni
Background
Java Engineer @ Orbitz Worldwide
  Brought Ruby and RSpec/Cucumber to replace
  Fitness Testing
Application Developer @ Factory Design Labs
  Brand & Campaign sites for Audi, Oakley, and TNF
Independent Contractor
  Development team for TechStars alumni
Background
Java Engineer @ Orbitz Worldwide
  Brought Ruby and RSpec/Cucumber to replace
  Fitness Testing
Application Developer @ Factory Design Labs
  Brand & Campaign sites for Audi, Oakley, and TNF
Independent Contractor
  Development team for TechStars alumni
mongo machine
    hosted MongoDB wherever you need it
What’s mongo machine ?
mongo machine
         hosted MongoDB + data management


 http://mongomachine.com
mongo machine    hosted MongoDB + data management

Our Goals
    Educate and promote best practices
    Increase customer efficiency
    Promote transparency
Our Product
Hosted MongoDB
Provide the best managed MongoDB
experience, on any platform.
mongo machine     hosted MongoDB + data management




Managed MongoDB Infrastructure
   Our infrastructure on AWS or Rackspace
   Automated Deployments to your own infrastructure

Management Console
   Instantly create new databases
   Track database trends
   Scale up & down on-demand
Management Console
Analytics data about what your DB is doing.
Management Console
Analytics data about what your DB is doing.
Introduction to MongoDB
“NoSQL”
hasn’t this been tried before?
why should I care now?
So what is MongoDB?
      (10,000ft view)
MongoDB (from "humongous") is a
scalable, high-performance, open source,
    schema-free, document-oriented
                database.
                                 -- mongodb.org
Who is using MongoDB?
Fortune 500 <=> Startups
Github
Bug Tracking & Analytics
Foursquare
Check-in System
New York Times	
Photo Submissions
The list is large and growing fast




http://www.mongodb.org/display/DOCS/Production+Deployments
Introduction to MongoDB
Philosophy
Philosophy



        “One size DOESN’T fit”
Philosophy



 Non-relational (de-normalized) DBs are easier to scale,
                  especially horizontally
Philosophy



 DBs should be an on-demand commodity (cloud-like)
Philosophy



 Focus on performance, flexibility and scalability (CA)
Philosophy



  Not concerned with transactional stuff or relational
                    semantics
Philosophy
Mongo aims for the
performance of key-
value stores while
maintaining
functionality of
traditional RDBMS
Introduction to MongoDB
Features
Features
Standard database stuff
  Indexing
  Traditional master-slave
  Database References (no concept of JOINS)
Features
Standard database stuff
  Indexing
  Traditional master-slave
  Database References (no concept of JOINS)
Features
Standard database stuff
  Indexing
  Traditional master-slave
  Database References (no concept of JOINS)
Features
Standard database stuff
  Indexing
  Traditional master-slave
  Database References (no concept of JOINS)
Features


Speed
in-memory dataset with fsync to disk
Features


Durability
solve with replication, or use journaling
Features



Document-oriented database
Features: Document Storage



 Documents are stored in BSON (binary JSON)
Features: Document Storage



 BSON is a binary serialization of JSON-like objects
Features: Document Storage



 Large BSON documents are served in chunks (GridFS)
Features: Document Storage



 This is extremely powerful, b/c it means mongo
 understands JSON natively
Features: Document Storage



 Any valid JSON can be easily imported and queried
Features: Document Storage


 Documents can contain embedded documents
 (nested hashes) without losing any indexing
 capabilities.
Features


Schema-less; very flexible
no more blocking ALTER TABLE or NULL debates
Features



Replica Sets and Sharding make horizontal scaling easy.
Features: Replica Set
  Traditional Master-Slave, but automatic failover
  Each server holds all data (CA)
  One is elected master at a given time
  Arbitration process detects failover
  New election within seconds
Features: Replica Set
  Traditional Master-Slave, but automatic failover
  Each server holds all data (CA)
  One is elected master at a given time
  Arbitration process detects failover
  New election within seconds
Features: Replica Set
  Traditional Master-Slave, but automatic failover
  Each server holds all data (CA)
  One is elected master at a given time
  Arbitration process detects failover
  New election within seconds
Features: Replica Set
  Traditional Master-Slave, but automatic failover
  Each server holds all data (CA)
  One is elected master at a given time
  Arbitration process detects failover
  New election within seconds
Features: Replica Set
  Traditional Master-Slave, but automatic failover
  Each server holds all data (CA)
  One is elected master at a given time
  Arbitration process detects failover
  New election within seconds
Features


Map/Reduce
Map Reduce operations are written in Javascript.
Features: Querying
Rich, javascript-based query syntax
  Allows us to do deep, nested queries
Features: Querying
Rich, javascript-based query syntax
  Allows us to do deep, nested queries
Features: Querying
Rich, javascript-based query syntax
  Allows us to do deep, nested queries

  db.order.find( { shipping: { carrier: "usps" } } );
Features: Querying
Rich, javascript-based query syntax
  Allows us to do deep, nested queries

  db.order.find( { shipping: { carrier: "usps" } } );




 shipping is an embedded document (object)
Features


atomic operations
upserts, $set, $inc, $push, $pull, $pop, $addToSet, ...
Features
 Official Drivers
 .NET, Java, Javascript, Ruby, Node.js, PHP, Haskell, C/C++, Perl
Features
 Community & Market Growth
 MongoDB works alongside your existing technologies
Introduction to MongoDB
Concepts
Concepts: Document-oriented
  Think of “documents” as objects / database records
Concepts: Document-oriented
  Think of “documents” as objects / database records
  Documents are basically just JSON in binary
Concept: Document-oriented
  Think of “documents” as objects / database records
  Documents are basically just JSON in binary
  Ability to store information all together
Concept Mapping
RDBMS (mysql, postgres)   MongoDB


        Tables            Collections
Concept Mapping
RDBMS (mysql, postgres)       MongoDB


        Tables               Collections


     Records/rows         Documents/objects
Concept Mapping
RDBMS (mysql, postgres)           MongoDB


         Tables                   Collections


     Records/rows            Documents/objects


 Queries return record(s)   Queries return a cursor
Concept Mapping
RDBMS (mysql, postgres)          MongoDB


         Tables                  Collections


     Records/rows            Documents/objects


Queries return record(s)   Queries return a cursor


                  ???
Concepts: Cursors
Queries return “cursors” instead of collections
Concepts: Cursors
Queries return “cursors” instead of collections
  A cursor allows you to iterate through the result set
Concepts: Cursors
Queries return “cursors” instead of collections
  A cursor allows you to iterate through the result set
  A big reason for this is performance
Concepts: Cursors
Queries return “cursors” instead of collections
  A cursor allows you to iterate through the result set
  A big reason for this is performance
  Much more efficient than loading all objects into
  memory
Concepts: Cursors
The find() function returns a cursor object
Concepts: Cursors
The find() function returns a cursor object

 var cursor = db.logged_requests.find({ 'status_code' : 200 })

 cursor.hasNext() // "true"

 cursor.forEach(
    function(item) {
      print(tojson(item))
    }
 );

 cursor.hasNext() // "false"
Introduction to MongoDB
Cool Features
Cool Features
Capped collections
  Fixed-sized, limited operation, auto-LRU age-out
  collections
  Fixed insertion order
  Extremely performant
  Ideal for logging and caching
Cool Features
Capped collections
  Fixed-sized, limited operation, auto-LRU age-out
  collections
  Fixed insertion order
  Extremely performant
  Ideal for logging and caching
Cool Features
Capped collections
  Fixed-sized, limited operation, auto-LRU age-out
  collections
  Fixed insertion order
  Extremely performant
  Ideal for logging and caching
Cool Features
Capped collections
  Fixed-sized, limited operation, auto-LRU age-out
  collections
  Fixed insertion order
  Extremely performant
  Ideal for logging and caching
Cool Features
Capped collections
  Fixed-sized, limited operation, auto-LRU age-out
  collections
  Fixed insertion order
  Extremely performant
  Ideal for logging and caching
Introduction to MongoDB
Use Cases
Use Cases
Data Warehouse
 Mongo understands JSON natively
 Very powerful map-reduce for analytics
 Nested hashes make roll-up (RRDtool) systems
 natural
Use Cases
Data Warehouse
 Mongo understands JSON natively
 Very powerful map-reduce for analytics
 Nested hashes make roll-up (RRDtool) systems
 natural
Use Cases
Data Warehouse
 Mongo understands JSON natively
 Very powerful map-reduce for analytics
 Nested hashes make roll-up (RRDtool) systems
 natural
Use Cases
Data Warehouse
 Mongo understands JSON natively
 Very powerful map-reduce for analytics
 Nested hashes make roll-up (RRDtool) systems
 natural
Use Cases
Audit Trails
  Nested documents allow you to store audit trails in
  context.
Use Cases
Audit Trails
  Nested documents allow you to store audit trails in
  context.
               {
                   ‘name’: ‘Justin Smestad’,
                   ‘address’: ‘1441 Central St’,
                   ‘history’: [
                     {
                         ‘name’: ‘Justin Smestad’,
                         ‘address’: ‘350 S Jackson St’
                     },....]
               }
Introduction to MongoDB
Limitations
Limitations
 Transaction support
 Relational integrity (normalization)
 Partition balancing
 Map / Reduce is single threaded
 Data compaction
Limitations
 Transaction support
 Relational integrity (normalization)
 Partition balancing
 Map / Reduce is single threaded
 Data compaction
Limitations
 Transaction support
 Relational integrity (normalization)
 Partition balancing
 Map / Reduce is single threaded
 Data compaction
Limitations
 Transaction support
 Relational integrity (normalization)
 Partition balancing
 Map / Reduce is single threaded
 Data compaction
Limitations
 Transaction support
 Relational integrity (normalization)
 Partition balancing
 Map / Reduce is single threaded
 Data compaction
Why not `other db` ?
CouchDB, Cassandra, Riak, Membase, Redis, ...
Why not `other db`?


 FLEXIBILITY
 MongoDB’s design choices empower developers and
 administrators with features that allow you to
 implement their own solutions. *
Questions?
@jsmestad / @mongo_machine

More Related Content

What's hot (20)

PPTX
MongoDB
nikhil2807
 
PPTX
Basics of MongoDB
HabileLabs
 
PPTX
A Presentation on MongoDB Introduction - Habilelabs
HabileLabs
 
PPT
Introduction to mongodb
neela madheswari
 
PPTX
MongoDB 101
Abhijeet Vaikar
 
KEY
Practical Ruby Projects With Mongo Db
Alex Sharp
 
PDF
Introduction to mongo db
Rohit Bishnoi
 
PDF
Mongo db dhruba
Dhrubaji Mandal ♛
 
PPT
Introduction to mongoDB
Cuelogic Technologies Pvt. Ltd.
 
PPTX
Mongodb basics and architecture
Bishal Khanal
 
PDF
Intro To MongoDB
Alex Sharp
 
PPTX
Mongo db intro.pptx
JWORKS powered by Ordina
 
PDF
Mongodb tutorial at Easylearning Guru
KCC Software Ltd. & Easylearning.guru
 
PPT
MongoDB Pros and Cons
johnrjenson
 
PPTX
Introduction to MongoDB
NodeXperts
 
PDF
MongoDB and Schema Design
Matias Cascallares
 
PDF
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
ODP
Introduction to MongoDB
Dineesha Suraweera
 
PPTX
Top 10 frameworks of node js
HabileLabs
 
PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB
nikhil2807
 
Basics of MongoDB
HabileLabs
 
A Presentation on MongoDB Introduction - Habilelabs
HabileLabs
 
Introduction to mongodb
neela madheswari
 
MongoDB 101
Abhijeet Vaikar
 
Practical Ruby Projects With Mongo Db
Alex Sharp
 
Introduction to mongo db
Rohit Bishnoi
 
Mongo db dhruba
Dhrubaji Mandal ♛
 
Introduction to mongoDB
Cuelogic Technologies Pvt. Ltd.
 
Mongodb basics and architecture
Bishal Khanal
 
Intro To MongoDB
Alex Sharp
 
Mongo db intro.pptx
JWORKS powered by Ordina
 
Mongodb tutorial at Easylearning Guru
KCC Software Ltd. & Easylearning.guru
 
MongoDB Pros and Cons
johnrjenson
 
Introduction to MongoDB
NodeXperts
 
MongoDB and Schema Design
Matias Cascallares
 
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
Introduction to MongoDB
Dineesha Suraweera
 
Top 10 frameworks of node js
HabileLabs
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 

Viewers also liked (20)

PPTX
MongoDB
jsterce
 
PPT
A Brief MongoDB Intro
Scott Hernandez
 
PDF
MongoDB: Intro & Application for Big Data
Takahiro Inoue
 
PPTX
Introdução no sql mongodb java
Fabiano Modos
 
PPTX
MongoDB: Mastering the shell
Scott Hernandez
 
PDF
Mongo db intro &amp; tips
InBum Kim
 
PPTX
3 scenarios when to use MongoDB!
Edureka!
 
PDF
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Severalnines
 
PDF
Java development with MongoDB
James Williams
 
PPTX
Webinar: An Enterprise Architect’s View of MongoDB
MongoDB
 
PPT
MongoDB Tick Data Presentation
MongoDB
 
PPTX
Schema design with MongoDB (Dwight Merriman)
MongoSF
 
ODP
MongoDB Devops Madrid February 2012
Juan Vicente Herrera Ruiz de Alejo
 
ODP
Introduction to MongoDB
Knoldus Inc.
 
PPTX
Getting Started with MongoDB
Pankaj Bajaj
 
PPTX
Mastering the MongoDB Javascript Shell
Scott Hernandez
 
PPTX
MongoDB
Tharun Srinivasa
 
KEY
Introduction to MongoDB
Sean Laurent
 
PDF
Intro to NoSQL and MongoDB
MongoDB
 
KEY
Mongodb intro
christkv
 
MongoDB
jsterce
 
A Brief MongoDB Intro
Scott Hernandez
 
MongoDB: Intro & Application for Big Data
Takahiro Inoue
 
Introdução no sql mongodb java
Fabiano Modos
 
MongoDB: Mastering the shell
Scott Hernandez
 
Mongo db intro &amp; tips
InBum Kim
 
3 scenarios when to use MongoDB!
Edureka!
 
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Severalnines
 
Java development with MongoDB
James Williams
 
Webinar: An Enterprise Architect’s View of MongoDB
MongoDB
 
MongoDB Tick Data Presentation
MongoDB
 
Schema design with MongoDB (Dwight Merriman)
MongoSF
 
MongoDB Devops Madrid February 2012
Juan Vicente Herrera Ruiz de Alejo
 
Introduction to MongoDB
Knoldus Inc.
 
Getting Started with MongoDB
Pankaj Bajaj
 
Mastering the MongoDB Javascript Shell
Scott Hernandez
 
Introduction to MongoDB
Sean Laurent
 
Intro to NoSQL and MongoDB
MongoDB
 
Mongodb intro
christkv
 
Ad

Similar to Introduction to MongoDB (20)

PPTX
MongoDB
Rony Gregory
 
PPTX
MongoDB presentation
Hyphen Call
 
PDF
Introduction to MongoDB Basics from SQL to NoSQL
Mayur Patil
 
PDF
Mongo db transcript
foliba
 
PPTX
MongoDB
Albin John
 
PPTX
MongoDB
Albin John
 
PPTX
MongoDB_Sharan_Prakash_Babu
Sharan
 
PPTX
Einführung in MongoDB
NETUserGroupBern
 
PPTX
Mongodb
ASEEMSRIVASTAVA22
 
PPTX
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Manish Pandit
 
PPTX
Kalp Corporate MongoDB Tutorials
Kalp Corporate
 
PPTX
Drop acid
Mike Feltman
 
PPTX
Mongo db
Gyanendra Yadav
 
PDF
10gen MongoDB Video Presentation at WebGeek DevCup
WebGeek Philippines
 
KEY
MongoDB
Steven Francia
 
PDF
Mongodb
ichangbai
 
PPTX
Mongo db Quick Guide
Sourabh Sahu
 
PDF
Open source Technology
Amardeep Vishwakarma
 
PPTX
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
 
PPTX
MongoDB 2.4 and spring data
Jimmy Ray
 
MongoDB
Rony Gregory
 
MongoDB presentation
Hyphen Call
 
Introduction to MongoDB Basics from SQL to NoSQL
Mayur Patil
 
Mongo db transcript
foliba
 
MongoDB
Albin John
 
MongoDB
Albin John
 
MongoDB_Sharan_Prakash_Babu
Sharan
 
Einführung in MongoDB
NETUserGroupBern
 
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Manish Pandit
 
Kalp Corporate MongoDB Tutorials
Kalp Corporate
 
Drop acid
Mike Feltman
 
Mongo db
Gyanendra Yadav
 
10gen MongoDB Video Presentation at WebGeek DevCup
WebGeek Philippines
 
Mongodb
ichangbai
 
Mongo db Quick Guide
Sourabh Sahu
 
Open source Technology
Amardeep Vishwakarma
 
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
 
MongoDB 2.4 and spring data
Jimmy Ray
 
Ad

More from Justin Smestad (7)

KEY
MongoDB in the Cloud -- Mongo Boulder
Justin Smestad
 
KEY
MongoMachine Presentation for MongoSV 2010
Justin Smestad
 
KEY
Mongo Seattle - The Business of MongoDB
Justin Smestad
 
KEY
Testing Web Services in Ruby
Justin Smestad
 
KEY
MongoDB & Mongoid with Rails
Justin Smestad
 
KEY
Boulder StaleFish Presentation
Justin Smestad
 
KEY
Refactor Me presentation
Justin Smestad
 
MongoDB in the Cloud -- Mongo Boulder
Justin Smestad
 
MongoMachine Presentation for MongoSV 2010
Justin Smestad
 
Mongo Seattle - The Business of MongoDB
Justin Smestad
 
Testing Web Services in Ruby
Justin Smestad
 
MongoDB & Mongoid with Rails
Justin Smestad
 
Boulder StaleFish Presentation
Justin Smestad
 
Refactor Me presentation
Justin Smestad
 

Recently uploaded (20)

PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Digital Circuits, important subject in CS
contactparinay1
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 

Introduction to MongoDB