Your SlideShare is downloading. ×
0
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
MongoDb - Details on the POC
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 - Details on the POC

1,031

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,031
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
35
Comments
0
Likes
1
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. Goodbye rows and tables, hello documents and collections
  • 2. Lots of pretty pictures to fool you.
  • 3. Noise
  • 4. Introduction M ongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide rich queries and deep functionality). MongoDB is document-oriented , schema-free , scalable , high-performance , open source. Written in C++ Mongo is not a relational database like MySQL Goodbye rows and tables, hello documents and collections <ul><li>Features </li></ul><ul><li>Document-oriented </li></ul><ul><ul><li>Documents (objects) map nicely to programming language data types </li></ul></ul><ul><ul><li>Embedded documents and arrays reduce need for joins </li></ul></ul><ul><ul><li>No joins and no multi-document transactions for high performance and easy scalability </li></ul></ul><ul><li>High performance </li></ul><ul><ul><li>No joins and embedding makes reads and writes fast </li></ul></ul><ul><ul><li>Indexes including indexing of keys from embedded documents and arrays </li></ul></ul><ul><li>High availability </li></ul><ul><ul><li>Replicated servers with automatic master failover </li></ul></ul><ul><li>Easy scalability </li></ul><ul><ul><li>Automatic sharding (auto-partitioning of data across servers) </li></ul></ul><ul><ul><ul><li>Reads and writes are distributed over shards </li></ul></ul></ul><ul><ul><ul><li>No joins or multi-document transactions make distributed queries easy and fast </li></ul></ul></ul><ul><ul><li>Eventually-consistent reads can be distributed over replicated servers </li></ul></ul>
  • 5. <ul><li>Cost - MongoDB is free </li></ul><ul><li>MongoDb is easily installable. </li></ul><ul><li>MongoDb supports various programming languages like C, C++, Java,Javascript, PHP. </li></ul><ul><li>MongoDB is blazingly fast </li></ul><ul><li>MongoDB is schemaless </li></ul><ul><li>Ease of scale-out </li></ul><ul><li>If load increases it can be distributed to other nodes across computer networks. </li></ul><ul><li>It&apos;s trivially easy to add more fields -- even complex fields -- to your objects. </li></ul><ul><li>So as requirements change, you can adapt code quickly. </li></ul><ul><li>Background Indexing </li></ul><ul><li>MongoDB is a stand-alone server </li></ul><ul><li>Development time is faster, too, since there are no schemas to manage. </li></ul><ul><li>It supports Server-side JavaScript execution. </li></ul><ul><li>Which allows a developer to use a single programming language for both client and server side code </li></ul>Why ?
  • 6. <ul><li>Mongo is limited to a total data size of 2GB for all databases in 32-bit mode. </li></ul><ul><li>No referential integrity </li></ul><ul><li>Data size in MongoDB is typically higher. </li></ul><ul><li>At the moment Map/Reduce (e.g. to do aggregations/data analysis) is OK, </li></ul><ul><li>but not blisteringly fast. </li></ul><ul><li>Group By : less than 10,000 keys. </li></ul><ul><li>For larger grouping operations without limits, please use map/reduce . </li></ul><ul><li>Lack of predefined schema is a double-edged sword </li></ul><ul><li>No support for Joins &amp; transactions </li></ul>Limitations
  • 7. Benchmarking (MongoDB Vs. MySQL) Test Machine configuration: CPU : Intel Xeon 1.6 GHz - Quad Core, 64 Bit Memory : 8 GB RAM OS : Centos 5.2 - Kernel 2.6.18 64 bit Record Structure Field1 -&gt; String, Indexed Field2 -&gt; String, Indexed Filed3 -&gt; Date, Not Indexed Filed4 -&gt; Integer, Indexed
  • 8. Mongo data model <ul><li>A Mongo system (see deployment above) holds a set of databases </li></ul><ul><li>A database holds a set of collections </li></ul><ul><li>A collection holds a set of documents </li></ul><ul><li>A document is a set of fields </li></ul><ul><li>A field is a key-value pair </li></ul><ul><li>A key is a name (string) </li></ul><ul><li>A value is a </li></ul><ul><ul><li>basic type like string, integer, float, timestamp, binary, etc., </li></ul></ul><ul><ul><li>a document, or </li></ul></ul><ul><ul><li>an array of values </li></ul></ul>MySQL Term Mongo Term database database table collection index index row BSON document column BSON field Primary key _id field
  • 9. SQL to Mongo Mapping Chart
  • 10. Continued ... SQL Statement Mongo Statement
  • 11. Replication / Sharding <ul><li>Data Redundancy </li></ul><ul><li>Automated Failover </li></ul><ul><li>Distribute read load </li></ul><ul><li>Simplify maintenance </li></ul><ul><li>(compared to &amp;quot;normal&amp;quot; master-slave) </li></ul><ul><li>Disaster recovery from user error </li></ul><ul><li>Automatic balancing for changes in </li></ul><ul><li>load and data distribution </li></ul><ul><li>Easy addition of new machines </li></ul><ul><li>Scaling out to one thousand nodes </li></ul><ul><li>No single points of failure </li></ul><ul><li>Automatic failover </li></ul>
  • 12. These slides are online: http://amardeep.in/intro_to_mongodb.ppt

×