SlideShare a Scribd company logo
Twitter:  #mongoukIntro to MongoDBMongoUKDwight Merriman, 10gen
Non-relationalOperational Stores(“NoSQL”)RDBMS(Oracle, MySQL)New Gen. OLAP(vertica, aster, greenplum)
NoSQL Really Means:non-relational, next-generation operational datastores and databases
no joins+no complex transactionsHorizontally ScalableArchitectures
no joins+no complex transactionsNew Data Models
New Data Modelsimproved ways to develop applications?
Data ModelsKey / Valuememcached, DynamoTabularBigTableDocument OrientedMongoDB, CouchDB, JSON stores
Focus on performancememcached
key/valuescalability & performanceRDBMSdepth of functionality
JSON-style Documentsrepresented as BSON{“hello”:“world”}\x16\x00\x00\x00\x02hello\x00\x06\x00\x00\x00world\x00\x00http://bsonspec.org
Flexible “Schemas”{“author”: “eliot”, “text”: “...”,“tags”: [“mongodb”]}{“author”: “mike”, “text”: “...”}
Dynamic Queries
Atomic Update Modifiers
Focus on Performance
ReplicationReplica sets (v1.6, july)Master / slave (v1.0)m1m3masterm2slaveslaveslave
Auto-shardingShardsmongodmongodmongod...ConfigServersmongodmongodmongodmongodmongodmongodmongosmongos...client
Many Supported Platforms / Languages
Best Use CasesScaling OutCachingThe WebHigh Volume
Less Good Athighly transactionalad-hoc /offline  business intelligenceproblems that require SQL
A Quick Aside_idspecial keypresent in all documentsunique across a Collectionany type you want
The Administrative Shell (mongo)Examples to follow are in Javascript syntax, but can be done in any language.
Post{author: “mike”, date: new Date(), text: “my blog post...”, tags: [“mongodb”, “intro”]}
Comment{author: “eliot”, date: new Date(), text: “great post!”}
New Postpost = {author: “mike”,  date: new Date(),  text: “my blog post...”,  tags: [“mongodb”, “intro”]}db.posts.insert(post)
Embedding a Commentc = {author: “eliot”,  date: new Date(),  text: “great post!”}db.posts.update({_id: post._id},                 {$push: {comments: c}})
Embedding a Commentc = {author: “eliot”,  date: new Date(),  text: “great post!”}db.posts.update({_id: post._id},                 {$push: {comments: c}})Atomic
Posts by Authordb.posts.find({author: “mike”})Note: queries are JSON!
Last 10 Postsdb.posts.find()        .sort({date: -1})        .limit(10)
Posts Since April 1last_week = new Date(2010, 3, 1)db.posts.find({date: {$gt: last_week}})
Posts Ending With ‘Tech’db.posts.find({text: /Tech$/})
Posts With a Tagdb.posts.find({tags: “mongodb”})...and Fast(multi-key indexes)db.posts.ensureIndex({tags: 1})
Indexing / Querying on Embedded Docs(dot notation)db.posts.ensureIndex({“comments.author”: 1})db.posts.find({“comments.author”: “eliot”})
Counting Postsdb.posts.count()db.posts.find({author: “mike”}).count()
Basic Pagingpage = 2page_size = 15db.posts.find().limit(page_size)               .skip(page * page_size)
Migration: Adding Titles(just start adding them)post = {author: “mike”,        date: new Date(),        text: “another blog post...”,        tags: [“mongodb”],       title: “MongoDB for Fun and Profit”}post_id = db.posts.save(post)
Advanced Queries$gt, $lt, $gte, $lte, $ne, $all, $in, $nin, $ordb.posts.find({$where: “this.author == ‘mike’ ||                        this.title == ‘foo’”})
Other Cool Stuffaggregation and map/reducecapped collectionsunique indexesGridFSgeospatial indexes

More Related Content

What's hot (19)

PPTX
Mongo db – document oriented database
Wojciech Sznapka
 
PPTX
Mongo DB 102
Abhijeet Vaikar
 
ODP
MongoDB - javascript for your data
aaronheckmann
 
PDF
Mongo db basics
Harischandra M K
 
PDF
Omnibus database machine
Aleck Landgraf
 
PPTX
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
PDF
When to Use MongoDB
MongoDB
 
ODP
MongoDB - A Document NoSQL Database
Ruben Inoto Soto
 
PDF
Back to Basics 2017: Mí primera aplicación MongoDB
MongoDB
 
PDF
Superficial mongo db
DaeMyung Kang
 
PDF
Introduction to CouchDB - LA Hacker News
Michael Parker
 
PPTX
Intro To Mongo Db
chriskite
 
PDF
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
PostgresOpen
 
PDF
Mongo Presentation by Metatagg Solutions
Metatagg Solutions
 
PPT
PhpstudyTokyo MongoDB PHP CakePHP
ichikaway
 
PPTX
Conceptos básicos. Seminario web 2: Su primera aplicación MongoDB
MongoDB
 
KEY
MongoDB at GUL
Israel Gutiérrez
 
PPTX
Introduction to MongoDB at IGDTUW
Ankur Raina
 
PDF
Latinoware
kchodorow
 
Mongo db – document oriented database
Wojciech Sznapka
 
Mongo DB 102
Abhijeet Vaikar
 
MongoDB - javascript for your data
aaronheckmann
 
Mongo db basics
Harischandra M K
 
Omnibus database machine
Aleck Landgraf
 
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
When to Use MongoDB
MongoDB
 
MongoDB - A Document NoSQL Database
Ruben Inoto Soto
 
Back to Basics 2017: Mí primera aplicación MongoDB
MongoDB
 
Superficial mongo db
DaeMyung Kang
 
Introduction to CouchDB - LA Hacker News
Michael Parker
 
Intro To Mongo Db
chriskite
 
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
PostgresOpen
 
Mongo Presentation by Metatagg Solutions
Metatagg Solutions
 
PhpstudyTokyo MongoDB PHP CakePHP
ichikaway
 
Conceptos básicos. Seminario web 2: Su primera aplicación MongoDB
MongoDB
 
MongoDB at GUL
Israel Gutiérrez
 
Introduction to MongoDB at IGDTUW
Ankur Raina
 
Latinoware
kchodorow
 

Viewers also liked (18)

PDF
Ispn
Skills Matter
 
PDF
Jeremy Spring Source Blaze Ds
Skills Matter
 
PDF
Facets Of Fragmentation by Mark Murphy
Skills Matter
 
PPTX
Skills matter agile multitasking 2010
Skills Matter
 
PDF
Ikenna Okpala: London Java Community: Wicket and Scala - 27/07/2010.
Skills Matter
 
PDF
Tomas Grails
Skills Matter
 
PDF
Laug comet intro july 2010
Skills Matter
 
PPT
adam vile why investment banks won’t use public clouds
Skills Matter
 
PPTX
Skills matter v3
Skills Matter
 
PDF
Tech talk specflow_bddx_hassa_nagy
Skills Matter
 
PDF
Javawug bof 57 scala why now
Skills Matter
 
PDF
Phone gap nikolaionken-08-06
Skills Matter
 
PDF
Zen and-the-art-of-build-script-maintenance-skillsmatter
Skills Matter
 
PDF
Deliberate discovery bddx
Skills Matter
 
PPTX
Feature Injection River Glide
Skills Matter
 
PDF
Noboxing plugin
Skills Matter
 
PPTX
ARCHITECTURAL INNOVATION: EVENTING, EVENT SOURCING
Skills Matter
 
PPTX
DDD In Agile
Skills Matter
 
Jeremy Spring Source Blaze Ds
Skills Matter
 
Facets Of Fragmentation by Mark Murphy
Skills Matter
 
Skills matter agile multitasking 2010
Skills Matter
 
Ikenna Okpala: London Java Community: Wicket and Scala - 27/07/2010.
Skills Matter
 
Tomas Grails
Skills Matter
 
Laug comet intro july 2010
Skills Matter
 
adam vile why investment banks won’t use public clouds
Skills Matter
 
Skills matter v3
Skills Matter
 
Tech talk specflow_bddx_hassa_nagy
Skills Matter
 
Javawug bof 57 scala why now
Skills Matter
 
Phone gap nikolaionken-08-06
Skills Matter
 
Zen and-the-art-of-build-script-maintenance-skillsmatter
Skills Matter
 
Deliberate discovery bddx
Skills Matter
 
Feature Injection River Glide
Skills Matter
 
Noboxing plugin
Skills Matter
 
ARCHITECTURAL INNOVATION: EVENTING, EVENT SOURCING
Skills Matter
 
DDD In Agile
Skills Matter
 
Ad

Similar to Intro to mongodb mongouk jun2010 (20)

PDF
Introduction to Mongo DB-open-­‐source, high-­‐performance, document-­‐orient...
boychatmate1
 
PDF
Introduction to MongoDB
Mike Dirolf
 
KEY
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
PDF
MongoDB at FrozenRails
Mike Dirolf
 
PPTX
Marc s01 e02-crud-database
MongoDB
 
PPTX
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
MongoDB
 
KEY
MongoDB NYC Python
Mike Dirolf
 
KEY
MongoDB at RuPy
Mike Dirolf
 
KEY
Mongodb intro
christkv
 
KEY
Managing Social Content with MongoDB
MongoDB
 
PPT
2011 Mongo FR - MongoDB introduction
antoinegirbal
 
PPT
Introduction to MongoDB
antoinegirbal
 
PDF
Building Apps with MongoDB
Nate Abele
 
KEY
MongoDB Strange Loop 2009
Mike Dirolf
 
KEY
MongoDB at ZPUGDC
Mike Dirolf
 
KEY
MongoDB, PHP and the cloud - php cloud summit 2011
Steven Francia
 
PPT
MongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
MongoDB
 
PDF
Using MongoDB and Python
Mike Bright
 
PDF
2016 feb-23 pyugre-py_mongo
Michael Bright
 
PDF
Indexing and Query Optimizer
MongoDB
 
Introduction to Mongo DB-open-­‐source, high-­‐performance, document-­‐orient...
boychatmate1
 
Introduction to MongoDB
Mike Dirolf
 
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
 
MongoDB at FrozenRails
Mike Dirolf
 
Marc s01 e02-crud-database
MongoDB
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
MongoDB
 
MongoDB NYC Python
Mike Dirolf
 
MongoDB at RuPy
Mike Dirolf
 
Mongodb intro
christkv
 
Managing Social Content with MongoDB
MongoDB
 
2011 Mongo FR - MongoDB introduction
antoinegirbal
 
Introduction to MongoDB
antoinegirbal
 
Building Apps with MongoDB
Nate Abele
 
MongoDB Strange Loop 2009
Mike Dirolf
 
MongoDB at ZPUGDC
Mike Dirolf
 
MongoDB, PHP and the cloud - php cloud summit 2011
Steven Francia
 
MongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
MongoDB
 
Using MongoDB and Python
Mike Bright
 
2016 feb-23 pyugre-py_mongo
Michael Bright
 
Indexing and Query Optimizer
MongoDB
 
Ad

More from Skills Matter (20)

PDF
5 things cucumber is bad at by Richard Lawrence
Skills Matter
 
ODP
Patterns for slick database applications
Skills Matter
 
PDF
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Skills Matter
 
ODP
Oscar reiken jr on our success at manheim
Skills Matter
 
ODP
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Skills Matter
 
PDF
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Skills Matter
 
PDF
Cukeup nyc peter bell on getting started with cucumber.js
Skills Matter
 
PDF
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Skills Matter
 
ODP
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Skills Matter
 
ODP
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Skills Matter
 
PDF
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Skills Matter
 
PPTX
Dmitry mozorov on code quotations code as-data for f#
Skills Matter
 
PDF
A poet's guide_to_acceptance_testing
Skills Matter
 
PDF
Russ miles-cloudfoundry-deep-dive
Skills Matter
 
KEY
Serendipity-neo4j
Skills Matter
 
PDF
Simon Peyton Jones: Managing parallelism
Skills Matter
 
PDF
Plug 20110217
Skills Matter
 
PDF
Lug presentation
Skills Matter
 
PPT
I went to_a_communications_workshop_and_they_t
Skills Matter
 
PDF
Plug saiku
Skills Matter
 
5 things cucumber is bad at by Richard Lawrence
Skills Matter
 
Patterns for slick database applications
Skills Matter
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Skills Matter
 
Oscar reiken jr on our success at manheim
Skills Matter
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Skills Matter
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Skills Matter
 
Cukeup nyc peter bell on getting started with cucumber.js
Skills Matter
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Skills Matter
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Skills Matter
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Skills Matter
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Skills Matter
 
Dmitry mozorov on code quotations code as-data for f#
Skills Matter
 
A poet's guide_to_acceptance_testing
Skills Matter
 
Russ miles-cloudfoundry-deep-dive
Skills Matter
 
Serendipity-neo4j
Skills Matter
 
Simon Peyton Jones: Managing parallelism
Skills Matter
 
Plug 20110217
Skills Matter
 
Lug presentation
Skills Matter
 
I went to_a_communications_workshop_and_they_t
Skills Matter
 
Plug saiku
Skills Matter
 

Recently uploaded (20)

PDF
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
PPTX
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
PDF
“ONNX and Python to C++: State-of-the-art Graph Compilation,” a Presentation ...
Edge AI and Vision Alliance
 
PDF
Home Cleaning App Development Services.pdf
V3cube
 
PDF
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Modern Decentralized Application Architectures.pdf
Kalema Edgar
 
PDF
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PPTX
Essential Content-centric Plugins for your Website
Laura Byrne
 
PDF
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
“ONNX and Python to C++: State-of-the-art Graph Compilation,” a Presentation ...
Edge AI and Vision Alliance
 
Home Cleaning App Development Services.pdf
V3cube
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
Digital Circuits, important subject in CS
contactparinay1
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Modern Decentralized Application Architectures.pdf
Kalema Edgar
 
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
Essential Content-centric Plugins for your Website
Laura Byrne
 
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 

Intro to mongodb mongouk jun2010