MongoDB, it's not just about big data
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

MongoDB, it's not just about big data

on

  • 4,900 views

This is a presentation I gave at a NoSQL meetup in San Francisco on 08.09.11.

This is a presentation I gave at a NoSQL meetup in San Francisco on 08.09.11.

Statistics

Views

Total Views
4,900
Views on SlideShare
4,891
Embed Views
9

Actions

Likes
7
Downloads
70
Comments
0

6 Embeds 9

http://twitter.com 3
http://tweetedtimes.com 2
https://twitter.com 1
http://us-w1.rockmelt.com 1
http://a0.twimg.com 1
http://marakana.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Market Product Business Model Team [Plan]
  • nosql started bc bd but also revisit ds

MongoDB, it's not just about big data Presentation Transcript

  • 1. mongoDB It’s not just about big data 08.09.2011
  • 2. what is mongoDB?
  • 3.
    • “ Scalable, open-source, high-performance, document-oriented database ” - 10gen
  • 4. Storage model
    • relational
      • database
      • table
      • row
    • mongoDB
      • database
      • collection
      • document / object
  • 5. { _id: 1234, author: { name: “Bob Davis”, email : [email_address] }, post: “In these troubled times I like to …“, date: { $date: “2010-07-12 13:23UTC” }, location: [ -121.2322, 42.1223222 ], rating: 2.2, comments: [ { user: “jgs32@hotmail.com”, upVotes: 22, downVotes: 14, text: “Great point! I agree” }, { user: “holly.davidson@gmail.com”, upVotes: 421, downVotes: 22, text: “You are a moron” } ] } Documents (a.k.a. Objects)
  • 6. { _id: 1234, author: { name: “Bob Davis”, email : [email_address] }, post: “In these troubled times I like to …“, date: { $date: “2010-07-12 13:23UTC” }, location: [ -121.2322, 42.1223222 ], rating: 2.2, comments: [ { user: “jgs32@hotmail.com”, upVotes: 22, downVotes: 14, text: “Great point! I agree” }, { user: “holly.davidson@gmail.com”, upVotes: 421, downVotes: 22, text: “You are a moron” } ], tags: [ “Politics”, “Virginia” ] } Flexible “Schemas”
  • 7. dynamic queries db.posts.find({ author.name: “mike” }) db.posts.find({ rating: { $gt: 2 }}) db.posts.find({ tags: “Software” }) db.posts.find().sort({date: -1}).limit(10)
  • 8. query language
    • Predicates
      • <, <=, >, >=
      • $all
      • $exists
      • $ne
      • $in
      • $nin
      • $nor
      • $not
      • $or
      • $and
    • regular expressions
    • $where (js exps)
    • group()
    • ** no joins **
  • 9. indexes db.posts.ensureIndex({ author.name : 1 } db.posts.find({ author.name: “mike” })
  • 10. geospatial indexing and queries
    • db.places.ensureIndex( { loc: “2d” } )
    • db.places.find({ loc: { $near : [50, 50] } }).limit(10)
    • db.places.find({loc: {$within : {$box : [[40,40],[60,60]]}}})
    • db.places.find({loc: {$within : {$center : [[40,40],10]}}})
  • 11. atomic updates Comment c = {author: “will@objectlabs.com”, date: new Date(), text: “great post!”} db.posts.update({_id: post._id}, {$push: {comments: c}})
  • 12. atomic updates
    • operators
      • $set
      • $unset
      • $inc
      • $push
      • $pushAll
      • $pull
      • $pullAll
      • $bit
  • 13. aggregation and map/reduce
  • 14. Native drivers in almost every language
    • Java
    • Javascript
    • Python
    • Ruby
    • C#
    • PHP
    • and more…
  • 15. Built for scalability reliability from the ground up
  • 16. High performance, fault tolerant clusters made easy
    • Replica sets
    • Auto-sharding
  • 17. But, mongoDB is not just about big data
  • 18. Blog Post
  • 19.
    • &quot;Object-Relational mapping is the Vietnam of our industry” - Ted Neward
  • 20. { _id: 1234, author: { name: “Bob Davis”, email : [email_address] }, post: “In these troubled times I like to …“, date: { $date: “2010-07-12 13:23UTC” }, location: [ -121.2322, 42.1223222 ], rating: 2.2, comments: [ { user: “jgs32@hotmail.com”, upVotes: 22, downVotes: 14, text: “Great point! I agree” }, { user: “holly.davidson@gmail.com”, upVotes: 421, downVotes: 22, text: “You are a moron” } ], tags: [ “Politics”, “Virginia” ] } … vs. this loveliness
  • 21. mongoDB is a great general purpose database
  • 22. Good uses for MongoDB
    • accounts / user profiles
    • form data
    • CMS
    • storing geo-data
    • application configuration
    • application logging
  • 23. Q&A
  • 24. More info
    • MongoDB / 10Gen
      • http://mongodb.org
      • http://10gen.com
    • MongoLab
      • http://mongolab.com
      • [email_address]