Your SlideShare is downloading. ×
MongoDB San Francisco DrupalCon 2010
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

MongoDB San Francisco DrupalCon 2010

1,172
views

Published on

MongoDB San Francisco DrupalCon 2010

MongoDB San Francisco DrupalCon 2010


0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,172
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
41
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Karoly Negyesi Developer team lead NowPublic.com / Examiner.com
  • 2. History
    • Ingres early 1970s
    • 3. Oracle 1979
    • 4. MySQL 1982
    • 5. PostGRES 1986
  • 6. Moore's law
    • Doubling every 18 months
    • 7. Applies to:
      • Processing speed
      • 8. Memory capacity
      • 9. Hard disk capacity
  • 10. We need drastically different design
      http://varnish-cache.org/wiki/ArchitectNotes
  • 11. And now some Bayou slides... www.cs.berkeley.edu/~istoica/classes/cs268/06/notes/20-BFTx2.pdf
  • 12. SQL
    • Rigid schema
    • 13. Normal forms
    • 14. Transactions
    • 15. Rich feature set http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
    • 16. “Databases are operating systems that you don't have to write sound drivers for.” - Brian Aker http://twitter.com/timoreilly/status/12247022198
  • 17. Reality
    • The world is not rigid
    • 18. Denormalization
    • 19. Too much overhead for transactions
    • 20. Most of features are rarely needed
  • 21. Even worse The iPhone
  • 22. NoSQL
  • 28. MongoDB
  • 36. Simple example
    • db.things.save({ x : 3 })
    • 37. db.things.save({ y : 4 })
    • 38. db.things.find()
    • 39. { "_id" : ObjectId("4b10d1997bd1e19a46fc8862"), "x" : 3 }
    • 40. { "_id" : ObjectId("4b10d1aa7bd1e19a46fc8863"), "y" : 4 }
  • 41. ObjectID
    • By default generated
    • 42. Can be anything as long it's unique
  • 43. Update
    • db.things.save({a:1,b:2,c:3})
    • 44. o=db.things.findOne({b:2})
    • 45. o.c=4
    • 46. db.things.update({b:2}, o)
    • 47. db.things.find()
    • 48. { "a" : 1, "b" : 2, "c" : 4 }
  • 49. Modifier operators
    • db.things.update({ b : 2} , { $set : { c : 4 }})
    • 50. db.things.find()
    • 51. {"a" : 1, "b" : 2, "c" : 4 }
    • 52. db.things.update({ b : 2} , { $inc : { c : 100 }})
    • 53. db.things.find() {"a" : 1, "b" : 2, "c" : 104 }
  • 54. Arrays
    • db.things.save({a:[1,2,3]})
    • 55. db.things.save({a:[5,6,7]})
    • 56. db.things.find({a:2}) { "a" : [ 1, 2, 3 ] }
  • 57. Array modification
    • db.things.insert({n:1,a:[1,2,3]})
    • 58. db.things.update({n:1},{$push:{a:4}})
    • 59. db.things.find()
    • 60. { "n" : 1, "a" : [ 1, 2, 3, 4 ] }
  • 61. Objects
    • db.things.save({db:{name:'mongodb', interesting:true }})
    • 62. db.things.save({db:{name:'mysql', interesting:false }})
    • 63. db.things.find({'db.interesting':true})
    • 64. {"db" : { "name" : "mongodb", "interesting" : true } }
  • 65. Indexes
  • 68. New design
    • Not much design is needed...
    • 69. Search for ids and then load the rest
  • 70. What are great fits
    • Statistics
      • Many writes
      • 71. Loss is not that big a deal
    • Fluid data
      • Products in a web store
      • 72. User profiles
  • 73. Not so good fit
    • Very complex queries
    • 74. Transaction needs
  • 75. Drupal and Mongo
  • 81. Crazy...
    • DBTNG driver

×