SlideShare a Scribd company logo
1 of 21
Download to read offline
MongoDB is the New MySQL




Friday, July 23, 2010
MongoDB is...

                 • a schema-less, document-oriented database
                 • open-source (server: GPL, drivers: Apache)
                 • built on C++
                 • supported commercially by 10gen


Friday, July 23, 2010
Why MongoDB?

                 • Fast
                 • Highly scalable: replication, sharding
                 • Open-source
                 •      runs on Windows




Friday, July 23, 2010
Trade-offs




Friday, July 23, 2010
ACID

                 • Atomicity - A transaction is all or nothing
                 • Consistency - Only valid data is written to
                        the database
                 • Isolation - Pretend all transactions are
                        happening serially and the data is correct
                 • Durability - What you write is what you get

Friday, July 23, 2010
BASE

                 • Basically Available - system seems to work
                        all the time
                 • Soft state - it doesn’t have to be consistent
                        all the time
                 • Eventually consistent - becomes consistent
                        at some later time



Friday, July 23, 2010
memcached
   Scalability & Performance

                                     key-value stores     mongoDB




                                                                RDBMS




                                       Depth of Functionality
Friday, July 23, 2010
Programming




Friday, July 23, 2010
ActiveModel?




Friday, July 23, 2010
Persistence




Friday, July 23, 2010
Querying




Friday, July 23, 2010
Named Scopes!




Friday, July 23, 2010
Named Scopes!




Friday, July 23, 2010
Named Scopes!




Friday, July 23, 2010
Callbacks
           before_create
           before_destroy
           before_save
           before_update
           before_validation
           after_create
           after_destroy
           after_save
           after_update
           after_validation




Friday, July 23, 2010
Validation




Friday, July 23, 2010
Administration




Friday, July 23, 2010
Replication


                 • M -> S
                 • M -> S*
                 • Replica sets [aka clusters] coming in v.1.6


Friday, July 23, 2010
Sharding




Friday, July 23, 2010
Questions?
                        Radamanthus Batnag
                          rad@infinite.ly




Friday, July 23, 2010
Links

                 • http://www.mongodb.org/
                 • http://www.mongoid.org
                 • http://highscalability.com/drop-acid-and-
                        think-about-data
                 • http://www.thenetworkadministrator.com/
                        MongoDB_MySQL.htm



Friday, July 23, 2010

More Related Content

Similar to MongoDB is the new MySQL

HTML 5: The Future of the Web
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the WebTim Wright
 
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP GroupDeveloping Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Groupminddog
 
Availability, the Cloud and Everything
Availability, the Cloud and EverythingAvailability, the Cloud and Everything
Availability, the Cloud and Everythinglogicalstack
 
Designing With Type :: FontConf 2010
Designing With Type :: FontConf 2010Designing With Type :: FontConf 2010
Designing With Type :: FontConf 2010Kyle Meyer
 
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010Guillaume Laforge
 
Drupal security - Configuration and process
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and processGábor Hojtsy
 
Yet Another Replication Tool: RubyRep
Yet Another Replication Tool: RubyRepYet Another Replication Tool: RubyRep
Yet Another Replication Tool: RubyRepDenish Patel
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Development Seed
 
Drizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemDrizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemRonald Bradford
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)Mark Proctor
 
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett
Cook Up a Runtime with The New OSGi Resolver - Neil BartlettCook Up a Runtime with The New OSGi Resolver - Neil Bartlett
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlettmfrancis
 
Scaling GIS Data in Non-relational Data Stores
Scaling GIS Data in Non-relational Data StoresScaling GIS Data in Non-relational Data Stores
Scaling GIS Data in Non-relational Data StoresMike Malone
 
Rubinius - What Have You Done For Me Lately
Rubinius - What Have You Done For Me LatelyRubinius - What Have You Done For Me Lately
Rubinius - What Have You Done For Me Latelyevanphx
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?marius_bogoevici
 

Similar to MongoDB is the new MySQL (20)

HTML 5: The Future of the Web
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the Web
 
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP GroupDeveloping Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
Developing Plugins on OpenVBX at Greater San Francisco Bay Area LAMP Group
 
Availability, the Cloud and Everything
Availability, the Cloud and EverythingAvailability, the Cloud and Everything
Availability, the Cloud and Everything
 
Designing With Type :: FontConf 2010
Designing With Type :: FontConf 2010Designing With Type :: FontConf 2010
Designing With Type :: FontConf 2010
 
No sql findings
No sql findingsNo sql findings
No sql findings
 
Oscon 2010
Oscon 2010Oscon 2010
Oscon 2010
 
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
Implementing Groovy Domain-Specific Languages - S2G Forum - Munich 2010
 
Oc Cloud Obscurity
Oc Cloud ObscurityOc Cloud Obscurity
Oc Cloud Obscurity
 
Drupal security - Configuration and process
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and process
 
Yet Another Replication Tool: RubyRep
Yet Another Replication Tool: RubyRepYet Another Replication Tool: RubyRep
Yet Another Replication Tool: RubyRep
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:
 
Drizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemDrizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and Ecosystem
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Check Please!
Check Please!Check Please!
Check Please!
 
Základy GWT
Základy GWTZáklady GWT
Základy GWT
 
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett
Cook Up a Runtime with The New OSGi Resolver - Neil BartlettCook Up a Runtime with The New OSGi Resolver - Neil Bartlett
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett
 
Scaling GIS Data in Non-relational Data Stores
Scaling GIS Data in Non-relational Data StoresScaling GIS Data in Non-relational Data Stores
Scaling GIS Data in Non-relational Data Stores
 
Rubinius - What Have You Done For Me Lately
Rubinius - What Have You Done For Me LatelyRubinius - What Have You Done For Me Lately
Rubinius - What Have You Done For Me Lately
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?
 

MongoDB is the new MySQL