• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Evolution of mongodb
 

Evolution of mongodb

on

  • 330 views

 

Statistics

Views

Total Views
330
Views on SlideShare
330
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

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

    Evolution of mongodb Evolution of mongodb Presentation Transcript

    • Evolution of Mongodb An introduction to what and why is mongodb
    • What is Mongodb ? Humongous {name:mongodb,type:db} 10gen
    • What is Mongodb ? Non-relational Json/bson document store Nosql What is it? Schemaless , what is schema less? And why?
    • Agenda Why mongodb is required or where mongodb fits in Mongodb schemaless architecture Mongodb and RDBMS Scalability and performance Summary
    • Why Mongodb ? Click to edit to edit Master text styles  Click the outline text format Where mongodb fits in  −  Second level Second Outline Level the world?   ThirdOutline Level Third level  Fourth level Level − Fourth Outline  Fifth Fifth Outline Level  level  Sixth Outline Level  Seventh Outline LevelClick to edit Master text styles  Second level  Third level  Fourth level  Fifth level
    • Why Mongodb ? Where mongodb fits in the world? to edit the outline text format Click  − Second Outline Level  Relational based DBMS is not known to be scalable Third Outline Level  − Fourth Outline Level  You require high end hardware architecture for performance Fifth Outline Level  when it comes to RDMBS Sixth Outline Level   Seventh Outline LevelClick to edit Master text styles  RDBMS data storage is not easy flexible  Second level  Third level  Fourth level  Fifth level
    • Why Mongodb ?  Click to edit the outline text formatRelational db is not known to be very scalable and performance oriented unless ifyou have very good hardware but if you go for commodity Outline Level it will still − Second based serverprovide its rich functionality but wont be performance oriented and hence not much Third Outline Level scalable − Fourth Outline Level  Fifth Outline Level  Sixth Outline LevelSome softwares like Memcache,redis or other key-value store is very good when it  Seventh Outline LevelClick to edit Master textcomes to performance and scalability but often they provide a limited functionality styles  Second level  Third level  Fourth level  Fifth level
    • Why Mongodb ?  Click to edit the outline text formatMongodb fills the gap between these two so its very performance oriented and scalable − Second Outline Leveland have rich set of functionality too that often comparable to what RDMBSprovides , Third Outline Level  − Fourth Outline LevelIt does deliberately though omit few functionality of RDBMS in order to Outline Level Fifth retain scalability and performance. Sixth Outline Level   Seventh Outline LevelClick to edit Master textMongo db does not support Joins , Transactions and schema less styles  Second levelWe will come to it for more when we gonna discuss difference between mongodb andrelational db in coming section  Third level  Fourth level  Fifth level
    • Schema less  Click to edit the outline text formatMongodb is schema lessWhat does it mean − Second Outline LevelWhy ?  Third Outline Level − Fourth Outline Level  Fifth Outline Level  Sixth Outline Level  Seventh Outline LevelClick to edit Master text styles  Second level  Third level  Fourth level  Fifth level
    • Schema less  Click to edit the outline text formatAnd one of reason for it is being schemalessIs It stores data as json document or in other word as javascript object and object − Second Outline LevelOften is schemaless one object can have different data andThird Outline Level  type then other. − Fourth Outline LevelWhy object is being stored instead of data?  Fifth Outline Level  Sixth Outline Level  Seventh Outline LevelClick to edit Master text styles  Second level  Third level  Fourth level  Fifth level
    • Schema less  Click to edit the outline text formatWhy object is being stored instead of data? − Second Outline Level  Third Outline Level − Fourth Outline Level  Fifth Outline Level  Sixth Outline Level  Seventh Outline LevelClick to edit Master text styles  Second level  Third level  Fourth level  Fifth level
    • Schema less  Click to edit the outline text formatWhy object is being stored instead of data? − Second Outline LevelOne size doesn’t fits all Third Outline Level We often need to interact with data objects in programs instead of data itself − Fourth Outline LevelNo ORM required Fifth Outline Level Object and its hierarchy is more closer to programming model. Sixth Outline Level   Seventh Outline LevelClick to edit Master text styles  Second level  Third level  Fourth level  Fifth level
    • Schema less  Click to edit the outline text formatSchemaless architecture of database − Second Outline LevelObjects are different to each other  Third Outline LevelAgility − Fourth Outline LevelNo Alter table  Fifth Outline Level  Sixth Outline Leveldb.students.save({name:“user1”,type:”student”})  Seventh Outline LevelClick to edit Master textdb.students.save({name:”user2”,type:”student”,favsubjects:[ ‘math’,’english’] }) stylesWe can change schema of existing document toodb.students.save({name:“user1”,type:”student”,favcolors:[‘blue’,’purple’]})  Second levelWe will be discussing more about schema in next  Third level relative to section Mongodbrelational  Fourth level  Fifth level
    • Mongodb & RDMBS Is mongodb replacement for RDBMS? When you should consider mongodb over RDBMS? What are pros and cons using mongodb?
    • Mongodb & RDMBS What are pros and cons using mongodb?TradeoffsMongodb provides: − Flexibility − Performance − ScalabilityDoes not support : Joins Transactions
    • Mongodb & RDMBS Why join and transactions are not being supported?Cos it has to be scalable and performance oriented. Using join will limit its scalability and transactions affect performance.Transactions often not required until you are building some secure , real time app which is very transactional.Though mongodb does provides atomic operations but its currently limited to one document only.
    • Mongodb & RDMBS How mongodb exists without join?
    • Mongodb & RDMBS How mongodb exists without join?And the answer is it support embed.Mongodb document being json fundamentally , can have embedded sub-documents with it.So a json document fundamentally comprised of a dictionary can have another array and even other dictionaries embedded to it.e.g :{ post : “abc”,
    • Mongodb & RDMBSEmbed ? Isnt it violating normal form rules?It Does and it could be beneficial or harmful depends onwhen you are using it.When to embed or not?
    • Mongodb & RDMBSWhen to embed or not?When to embed:. If it is being often accessed with main document, thenembed it.. If change to embedded document is most likely not to bedoneWhen not to embed:If size of document is going to be over 16 mb.{
    • Mongodb & RDMBS• When you should consider mongodb over RDBMS? If your DB is 3NF and you don’t do any joins (you’re justselecting a bunch of tables and putting all the objectstogether, AKA what most people do in a web app),MongoDB would probably for you.
    • Mongodb & RDMBS Is mongodb replacement for RDBMS? Its not when your application fall in below Categories:  High transactional  applications  Ad-hoc business intelligence  Problems which require a sql solution
    • Scalability and performanceScalability: Bigdata Replications Fault-tolerence High-availability MongoDB provides two types of scaling.  Read scaling: is provided by Replica Sets.  Write scaling is provided by Sharding.
    • Scalability and performanceScalability:Replica sets: A MongoDB replica set is a cluster of mongodinstances that replicate amongst one another and ensureautomated failoverSharding:MongoDB’s sharding system allows users to partition acollection within a database to distribute the collection’sdocuments across a number of mongod instances or shards , sharding is often termed as load-balancing feature of mongodbto ensure high traffic insert wouldn’t affect performance.
    • Scalability and performanceMongodb and performance:Is it comparable to RDMBS? Mysql? Point is it has got all and sometimes even more, that required for being a performance oriented dbms. and it depends on how you design your db. Support indexes Support distributed db architectureMost of the case mongodb is faster and requires less memory look up round then RDBMS to fetch records.
    • SummaryMongodb is fast, reliable, scalable database managementsystem. The main advantages as mentioned before areflexibility, scalability and performance , it is promising yethas some tradeoffs and therefore currently cannot replacethe RDBMs for each situation. It is a different type ofdatabase which can be a solution, based on therequirements of the situation. It will not replace RDBMsdatabases and it might run well side-by-side in the future
    • References stackoverflow 10 gen wiki Google
    • Thank you Anshuman Ravi, 10gen certified mongodb developer.