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

What's hot (20)

PDF
MongoDB
Serdar Buyuktemiz
 
KEY
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Jeremy Zawodny
 
PPTX
Introducción a NoSQL
MongoDB
 
PDF
Mongodb tutorial at Easylearning Guru
KCC Software Ltd. & Easylearning.guru
 
PPTX
Mango Database - Web Development
mssaman
 
PPT
Introduction to mongoDB
Cuelogic Technologies Pvt. Ltd.
 
PPT
Introduction to mongodb
neela madheswari
 
PDF
Introduction to mongo db
Rohit Bishnoi
 
PDF
10gen MongoDB Video Presentation at WebGeek DevCup
WebGeek Philippines
 
PPTX
Why MongoDB over other Databases - Habilelabs
HabileLabs
 
KEY
MongoDB SF Python
Mike Dirolf
 
PDF
MongoDB World 2016: Poster Sessions eBook
MongoDB
 
PDF
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
PPT
Introduction to MongoDB
Ravi Teja
 
PPTX
MongoDB Introduction - Document Oriented Nosql Database
Sudhir Patil
 
KEY
Sphinx at Craigslist in 2012
Jeremy Zawodny
 
KEY
MongoDB NYC Python
Mike Dirolf
 
PDF
An introduction to MongoDB
César Trigo
 
PDF
Introduction to MongoDB
Justin Smestad
 
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Jeremy Zawodny
 
Introducción a NoSQL
MongoDB
 
Mongodb tutorial at Easylearning Guru
KCC Software Ltd. & Easylearning.guru
 
Mango Database - Web Development
mssaman
 
Introduction to mongoDB
Cuelogic Technologies Pvt. Ltd.
 
Introduction to mongodb
neela madheswari
 
Introduction to mongo db
Rohit Bishnoi
 
10gen MongoDB Video Presentation at WebGeek DevCup
WebGeek Philippines
 
Why MongoDB over other Databases - Habilelabs
HabileLabs
 
MongoDB SF Python
Mike Dirolf
 
MongoDB World 2016: Poster Sessions eBook
MongoDB
 
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
Introduction to MongoDB
Ravi Teja
 
MongoDB Introduction - Document Oriented Nosql Database
Sudhir Patil
 
Sphinx at Craigslist in 2012
Jeremy Zawodny
 
MongoDB NYC Python
Mike Dirolf
 
An introduction to MongoDB
César Trigo
 
Introduction to MongoDB
Justin Smestad
 

Similar to MongoDB Hadoop DC (20)

KEY
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
PDF
Introduction to MongoDB
Mike Dirolf
 
PDF
MongoDB.pdf
KuldeepKumar778733
 
KEY
Mongodb intro
christkv
 
PPT
9. Document Oriented Databases
Fabio Fumarola
 
PDF
The emerging world of mongo db csp
Carlos Sánchez Pérez
 
PDF
Building your first app with mongo db
MongoDB
 
PDF
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
NETWAYS
 
PDF
Introduction to Mongo DB-open-­‐source, high-­‐performance, document-­‐orient...
boychatmate1
 
PPTX
Intro to mongodb mongouk jun2010
Skills Matter
 
PPTX
DBVersity MongoDB Online Training Presentations
Srinivas Mutyala
 
PPT
Introduction to Mongodb
Tulbendra Singh yadav
 
PDF
Building Apps with MongoDB
Nate Abele
 
KEY
2012 phoenix mug
Paul Pedersen
 
KEY
MongoDB at RubyEnRails 2009
Mike Dirolf
 
PPT
MongoDB Pros and Cons
johnrjenson
 
PDF
Mongo db eveningschemadesign
MongoDB APAC
 
PPTX
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
PPTX
MongoDB 2.4 and spring data
Jimmy Ray
 
PDF
Building Your First MongoDB App
Henrik Ingo
 
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
Introduction to MongoDB
Mike Dirolf
 
MongoDB.pdf
KuldeepKumar778733
 
Mongodb intro
christkv
 
9. Document Oriented Databases
Fabio Fumarola
 
The emerging world of mongo db csp
Carlos Sánchez Pérez
 
Building your first app with mongo db
MongoDB
 
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
NETWAYS
 
Introduction to Mongo DB-open-­‐source, high-­‐performance, document-­‐orient...
boychatmate1
 
Intro to mongodb mongouk jun2010
Skills Matter
 
DBVersity MongoDB Online Training Presentations
Srinivas Mutyala
 
Introduction to Mongodb
Tulbendra Singh yadav
 
Building Apps with MongoDB
Nate Abele
 
2012 phoenix mug
Paul Pedersen
 
MongoDB at RubyEnRails 2009
Mike Dirolf
 
MongoDB Pros and Cons
johnrjenson
 
Mongo db eveningschemadesign
MongoDB APAC
 
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
MongoDB 2.4 and spring data
Jimmy Ray
 
Building Your First MongoDB App
Henrik Ingo
 
Ad

More from Mike Dirolf (11)

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

Recently uploaded (20)

PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 

MongoDB Hadoop DC