Upgrade to Pro — share decks privately, control downloads, hide ads and more …

10 reasons to fall in love with MongoDB | Mikha...

10 reasons to fall in love with MongoDB | Mikhail Burtylev

Mikhail Burtylev,
Meetup #1

More Decks by Minsk MongoDB User Group

Other Decks in Technology

Transcript

  1. NoSQL     MongoDB  -­‐  humongous     Open  source,

     10gen   Cross-­‐pla;orm:  OS  X,  Linux,  Windows,  Solaris     v1.0  –  Aug  2009   v1.9.1  –  Aug  2011  (odd  –  DEV  version)   v2.0.3  –  Feb  2012   Introduc5on  
  2. 1.  Fast  &  powerful   Scalability and performance Depth of

    functionality key/value stores MongoDB RDBMS Focus on performance
  3. { _id: <document identifier>, key: “value”, subDocument: {innerProp: null} }

    JSON/BSON, 16MB Basic types, arrays, embedded documents, ObjectId, other 2.  Document-­‐oriented  
  4. 3.  Schema-­‐free   { _id: ObjectId("4B980A6DEA2C3F4579DA141E"), user_id: ObjectId("4B980A6DEA2C3F4579DA4F54"), shipping_address: {

    street: "3333 Green Ave", city: "Brooklyn", state: "NY"}, line_items: [ {sku: “rbk-423", name: “Case", price: 4000}, {sku: "spk-211", name: "Guitar", price: 9200}], subtotal: 13200, tax: 1100, total: 14300 } ObjectId Link to user Embedded document Array Embedded documents Duplication
  5. 4.  Rich  queries   db.books.find({name: “MongoDB”}); {author: {$exists: true}, “info.price”:

    {$lt: 10}} $gt, $lt, $or, $not, $type, $exists, $in, $all, $elemMatch $where – JavaScript expression db.books.find().skip(50).limit(10).sort({name: 1})
  6. 5.  Full  Index  Support   Basic keys, Compound keys Embedded

    fields, Arrays Unique, Sparse, Background Geospatial indexes (2d) db.places.find({loc: {$near: [50,50], $maxDistance: 5}}).limit(20)
  7. 7.  Replica5on   Master-Slave Replica Set M   S  

    S   S   M   S   M   S   M   M   S   M   (Data Center Awareness)
  8. 8.  Auto-­‐Sharding   Horizontal scalability client   AL <= state

    < KA KA <= state < OH OK <= state <= WY mongos   mongod   mongod   mongod  
  9. ~50MB of binaries No installation required Multi-language support: C#, C,

    C++, Java, Perl, PHP, Python, Ruby Tools: MongoVUE, RockMongo http://try.mongodb.org 9.  Easy  to  try