MongoDB 101

2,864 views

Published on

MongoDB introduction for a bunch of startup guys

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,864
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
23
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

MongoDB 101

  1. 1. MongoDB 101Just enough to start playing
  2. 2. What is it anyway ?● Document Oriented● High performance● Highly available● Horizontally Scalable● Open Source● NoSQL database
  3. 3. Data model - DocumentOriented● Documents (objects) map nicely toprogramming language data types.○ Document = PHP array, ruby hash, python dictionary● Embedded documents and arrays reduceneed for joins.● Dynamic schema makes polymorphismeasier.● JSON-style, stored as BSON
  4. 4. High Performance● Written in C++● use of memory mapped files● Serialization in BSON for fast parsing● Embedding● Indexes can include keys from embeddeddocuments and arrays.● Optional streaming writes (noacknowledgments).
  5. 5. NoSql - why should I care ?● Data has changed - unstructured dataDynamic schemas● Performance○ Auto sharding○ replication○ distributed, but integrated cache● Depends on what is your data○ Key-value○ column oriented○ graph
  6. 6. ● Horizontal vs Vertical● More data needs more machines, not biggermachines● Simplicity less ops when things growScalable
  7. 7. Why not anything else ?● Built with developers in mind, not ops● Available on all platforms - client librarybindings available for almost all languages(Erlang, Haskell, lua, smalltalk, prolog,..)● 10gen and great community behind● Near to RDBMS in NoSQL landscape.Similar to MyISAM storage engine for mysql● MongoDB does have support for atomicoperations within a single document.
  8. 8. RDBMS refugeesDB server mysqld mongodDB client mysql mongoHighest storage unit database databaseLogical data table collectionrow row documentcolumn column fieldJoin Join Embedded DocDistribute partition shard
  9. 9. Hybrid RDBMS-MongoDBApplications● Both has its own advantages● Use right tool for right job● We do need transections, joins and RDBMS● Not as complicated as you might think !!● Think mongodb collections as extendedtables from your RDBMS.
  10. 10. ● GridFS● MapReduce support● Sharded and Replica deployment● Aggregation● Indexing● Rest interface● ops - monitoring,backup,security● geo-spatial features● and ... lot more...A lot of other cool stuff
  11. 11. References● http://www.mongodb.org● http://www.10gen.com/presentations● MongoDB- The Definitive Guide● Tips & Tricks for mongoDB developers
  12. 12. Thanks !!@dharmeshkakadia

×