1
Today‟s Talk• 10gen• MongoDB• Real World Applications / Use Cases• Community                                  2
10gen• 10gen began the MongoDB project• Development, support, and services• ~125 employees• New York, Palo Alto, London, D...
MongoDBMongoDB is a scalable, high-performanceopen source NoSQL database  • Document-Oriented Storage  • Replication and H...
Database Landscape                            MemcachedScalability & Performance                               Key / Value...
What‟s a document anyway?doc ={  author : "roger",  date : "Sat Jul 24 2010 19:47:11 GMT-0700 (PDT)",  text : "Spirited Aw...
Atomic Updates• $set, $unset, $inc, $push, $pull, …> comment = { author: “john”,             date: new Date(),            ...
Querying // find posts tagged with Manga > db.posts.find( {tags: “Manga”} ) // find posts commented on by Fred > db.posts....
Query Operators• Conditional Operators  • $all, $exists, $mod, $ne, $in, $nin, $nor, $or, $size, $type  • $lt, $lte, $gt, ...
Indexes // Index nested documents > db.posts.ensureIndex( “comments.author”:1 )   db.posts.find({„comments.author‟:‟Fred‟...
Replica Sets       Write                Primary       Read                           Asynchronous               Secondary ...
Replica Sets       Write                Primary       Read               Secondary       Read               Secondary     ...
Replica Sets                Primary                           Automatic                           Leader Election       Wr...
Replica Sets               Secondary      Read       Write                Primary       Read               Secondary      ...
Write           Read          MongoS       MongoS        MongoS            MongoS Key Range          Key Range         Key...
MongoDB Use Cases                 Content  Analytics                  E-Commerce               Management Advertising     ...
Community•   MongoDB Days    •   23+ MongoDB Days reaching        over 10,000 people annually    •   MongoNYC May 23rd    ...
Upcoming SlideShare
Loading in …5
×

Technical Introduction to MongoDB

2,715 views

Published on

Presented at http://www.meetup.com/emerging-business-technology/events/60978812/

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,715
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Technical Introduction to MongoDB

  1. 1. 1
  2. 2. Today‟s Talk• 10gen• MongoDB• Real World Applications / Use Cases• Community 2
  3. 3. 10gen• 10gen began the MongoDB project• Development, support, and services• ~125 employees• New York, Palo Alto, London, Dublin• $31M+ funding (last round, Sept 2011)• Investors: Sequoia, Flybridge, Union Square 3
  4. 4. MongoDBMongoDB is a scalable, high-performanceopen source NoSQL database • Document-Oriented Storage • Replication and High Availability • Auto-Sharding • Fast In-Place updates • Ad-hoc Querying • Full index support • Map/Reduce
  5. 5. Database Landscape MemcachedScalability & Performance Key / Value RDBMS Depth of functionality
  6. 6. What‟s a document anyway?doc ={ author : "roger", date : "Sat Jul 24 2010 19:47:11 GMT-0700 (PDT)", text : "Spirited Away", tags : [ "Tezuka", "Manga" ], comments : [ { author : "Fred", date : "Sat Jul 24 2010 20:51:03 GMT-0700 (PDT)", text : "Best Movie Ever" } ]}
  7. 7. Atomic Updates• $set, $unset, $inc, $push, $pull, …> comment = { author: “john”, date: new Date(), text: “I didn„t like it so much”}> db.posts.update( { _id: doc._id }, $push: {comments: comment} );
  8. 8. Querying // find posts tagged with Manga > db.posts.find( {tags: “Manga”} ) // find posts commented on by Fred > db.posts.find( {“comments.author” : “Fred” } ) // Aggregation > db.posts.find( {author: „roger‟} ).count()
  9. 9. Query Operators• Conditional Operators • $all, $exists, $mod, $ne, $in, $nin, $nor, $or, $size, $type • $lt, $lte, $gt, $gte > db.posts.find({tags : {$in : [“Manga”, “animation}]})• Regular expressions > db.posts.find({author: /^r/})
  10. 10. Indexes // Index nested documents > db.posts.ensureIndex( “comments.author”:1 )  db.posts.find({„comments.author‟:‟Fred‟}) // Index on tags > db.posts.ensureIndex( tags: 1) > db.posts.find( { tags: ‟Manga‟ } )
  11. 11. Replica Sets Write Primary Read Asynchronous Secondary Replication Read Secondary Read
  12. 12. Replica Sets Write Primary Read Secondary Read Secondary Read
  13. 13. Replica Sets Primary Automatic Leader Election Write Primary Read Secondary Read
  14. 14. Replica Sets Secondary Read Write Primary Read Secondary Read
  15. 15. Write Read MongoS MongoS MongoS MongoS Key Range Key Range Key Range Key Range -∞..n1, n6..n7 n1..n2, n7..n8 n3..n4, n8..n9 n5..n6, n9..∞ Primary Primary Primary PrimarySecondary Secondary Secondary SecondarySecondary Secondary Secondary Secondary
  16. 16. MongoDB Use Cases Content Analytics E-Commerce Management Advertising Gaming Social Network
  17. 17. Community• MongoDB Days • 23+ MongoDB Days reaching over 10,000 people annually • MongoNYC May 23rd • MongoBoston in Fall• MongoDB User Groups • 28 cities with MUGs • Join Boston MUG • http://bit.ly/BostonMUG• User Forum • http://bit.ly/mongodb-user • 15,000+ questions answered• Office Hours • Coming soon… Suggestions? 17

×