SlideShare a Scribd company logo
open-source, high-performance,
schema-free, document-oriented
           database
MongoDB Hadoop DC
JSON-style documents
Schema-free

• Loosening constraints - added flexibility
• Dynamically typed languages
• Migrations
Dynamic queries

• Administration
• Ease of development
• Familiarity
Focus on performance
Replication
Auto-sharding
Many supported
platforms / languages
Good at

• The web
• Caching
• High volume data
• Scalability
Less good at

• Highly transactional
• Ad-hoc business intelligence
• Problems that require SQL
Quick example:
blog back-end
Post

{author: “mike”,
 date: new Date(),
 text: “my blog post...”,
 tags: [“mongodb”, “dc”, “hadoop”]}
Comment


{author: “eliot”,
 date: new Date(),
 text: “great post!”}
New post

post = {author: “mike”,
  date: new Date(),
  text: “my blog post...”,
  tags: [“mongodb”, “dc”, “hadoop”]}

db.posts.save(post)
Embedding a comment

c = {author: “eliot”,
  date: new Date(),
  text: “great post!”}

db.posts.update({_id: post._id},
                {$push: {comments: c}})
Posts by author


db.posts.find({author: “mike”})
Last 10 posts

db.posts.find()
        .sort({date: -1})
        .limit(10)
Posts in the last week


last_week = new Date(2009, 9, 9)

db.posts.find({date: {$gt: last_week}})
Sharding
Terminology
• Shard key
• Chunk
 • Range of the value space
 • (collection, key, min_val, max_val)
• Shard
 • Single node (or replica pair)
 • Responsible for set of chunks
MongoDB Hadoop DC
MongoDB Hadoop DC
Other cool stuff

• Aggregation and map reduce
• Capped collections
• Unique indexes
• Mongo shell
• GridFS
• Download MongoDB
  http://www.mongodb.org

• Try it out
• Let us know what you think
• http://www.mongodb.org
• irc.freenode.net#mongodb
• mongodb-user on google groups
• @mongodb, @mdirolf
• mike@10gen.com
• http://www.slideshare.net/mdirolf
Posts ending with
         ‘Hadoop’


db.posts.find({text: /hadoop$/})
Posts with a tag
db.posts.find({tag: “mongodb”})




          ... and fast
db.posts.ensureIndex({tag: 1})
Counting posts


db.posts.count()

db.posts.find({author: “mike”}).count()
Basic paging

page = 2
page_size = 15

db.posts.find().limit(page_size)
               .skip(page * page_size)
Migration: adding titles
  • Easy - just start adding them:
post = {author: “mike”,
        date: new Date(),
        text: “another blog post...”,
        tags: [“meetup”, “hadoop”],
        title: “Review from Hadoop DC”}

post_id = db.posts.save(post)
Advanced queries


    • $gt, $lt, $gte, $lte, $ne, $all, $in, $nin
    • where()
db.posts.find({$where: “this.author == ‘mike’”})

More Related Content

KEY
MongoDB EuroPython 2009
KEY
MongoDB Strange Loop 2009
KEY
MongoDB at RuPy
PDF
MongoDB Mojo: Building a Basic Perl App
PDF
MongoDB at FrozenRails
PPTX
Webinar: What's new in the .NET Driver
PPTX
A Presentation on MongoDB Introduction - Habilelabs
PPTX
MongoDB_Sharan_Prakash_Babu
MongoDB EuroPython 2009
MongoDB Strange Loop 2009
MongoDB at RuPy
MongoDB Mojo: Building a Basic Perl App
MongoDB at FrozenRails
Webinar: What's new in the .NET Driver
A Presentation on MongoDB Introduction - Habilelabs
MongoDB_Sharan_Prakash_Babu

What's hot (20)

PDF
KEY
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
PPTX
Introducción a NoSQL
PDF
Mongodb tutorial at Easylearning Guru
PPTX
Mango Database - Web Development
PPT
Introduction to mongoDB
PPT
Introduction to mongodb
PDF
Introduction to mongo db
PDF
10gen MongoDB Video Presentation at WebGeek DevCup
PPTX
Why MongoDB over other Databases - Habilelabs
KEY
MongoDB SF Python
PDF
MongoDB World 2016: Poster Sessions eBook
PDF
MongoDB for Coder Training (Coding Serbia 2013)
PPT
Introduction to MongoDB
PPTX
MongoDB Introduction - Document Oriented Nosql Database
KEY
Sphinx at Craigslist in 2012
KEY
MongoDB NYC Python
PDF
An introduction to MongoDB
PDF
Introduction to MongoDB
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Introducción a NoSQL
Mongodb tutorial at Easylearning Guru
Mango Database - Web Development
Introduction to mongoDB
Introduction to mongodb
Introduction to mongo db
10gen MongoDB Video Presentation at WebGeek DevCup
Why MongoDB over other Databases - Habilelabs
MongoDB SF Python
MongoDB World 2016: Poster Sessions eBook
MongoDB for Coder Training (Coding Serbia 2013)
Introduction to MongoDB
MongoDB Introduction - Document Oriented Nosql Database
Sphinx at Craigslist in 2012
MongoDB NYC Python
An introduction to MongoDB
Introduction to MongoDB
Ad

Similar to MongoDB Hadoop DC (20)

KEY
MongoDB at CodeMash 2.0.1.0
PDF
Introduction to MongoDB
PDF
MongoDB.pdf
KEY
Mongodb intro
PPT
9. Document Oriented Databases
PDF
The emerging world of mongo db csp
PDF
Building your first app with mongo db
PDF
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
PDF
Introduction to Mongo DB-open-­‐source, high-­‐performance, document-­‐orient...
PPTX
Intro to mongodb mongouk jun2010
PPTX
DBVersity MongoDB Online Training Presentations
PPT
Introduction to Mongodb
PDF
Building Apps with MongoDB
KEY
2012 phoenix mug
KEY
MongoDB at RubyEnRails 2009
PPT
MongoDB Pros and Cons
PDF
Mongo db eveningschemadesign
PPTX
MongoDB_ppt.pptx
PPTX
MongoDB 2.4 and spring data
PDF
Building Your First MongoDB App
MongoDB at CodeMash 2.0.1.0
Introduction to MongoDB
MongoDB.pdf
Mongodb intro
9. Document Oriented Databases
The emerging world of mongo db csp
Building your first app with mongo db
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
Introduction to Mongo DB-open-­‐source, high-­‐performance, document-­‐orient...
Intro to mongodb mongouk jun2010
DBVersity MongoDB Online Training Presentations
Introduction to Mongodb
Building Apps with MongoDB
2012 phoenix mug
MongoDB at RubyEnRails 2009
MongoDB Pros and Cons
Mongo db eveningschemadesign
MongoDB_ppt.pptx
MongoDB 2.4 and spring data
Building Your First MongoDB App
Ad

More from Mike Dirolf (11)

PDF
Indexing
PDF
Inside MongoDB: the Internals of an Open-Source Database
KEY
Inside PyMongo - MongoNYC
PDF
FrozenRails Training
KEY
Python Development (MongoSF)
KEY
MongoDB: How it Works
KEY
MongoDB at ZPUGDC
KEY
MongoDB hearts Django? (Django NYC)
PDF
MongoDB at RubyConf
KEY
MongoDB London PHP
KEY
MongoDB SF Ruby
Indexing
Inside MongoDB: the Internals of an Open-Source Database
Inside PyMongo - MongoNYC
FrozenRails Training
Python Development (MongoSF)
MongoDB: How it Works
MongoDB at ZPUGDC
MongoDB hearts Django? (Django NYC)
MongoDB at RubyConf
MongoDB London PHP
MongoDB SF Ruby

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PDF
Modernizing your data center with Dell and AMD
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
A Presentation on Artificial Intelligence
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Monthly Chronicles - July 2025
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Teaching material agriculture food technology
Modernizing your data center with Dell and AMD
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Unlocking AI with Model Context Protocol (MCP)
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation_ Review paper, used for researhc scholars
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
A Presentation on Artificial Intelligence
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx

MongoDB Hadoop DC