MongoDB is the new MySQL

815 views

Published on

Talk given before the July 22 Philippine Ruby Users Group meetup

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
815
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MongoDB is the new MySQL

  1. 1. MongoDB is the New MySQL Friday, July 23, 2010
  2. 2. 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
  3. 3. Why MongoDB? • Fast • Highly scalable: replication, sharding • Open-source • runs on Windows Friday, July 23, 2010
  4. 4. Trade-offs Friday, July 23, 2010
  5. 5. 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
  6. 6. 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
  7. 7. memcached Scalability & Performance key-value stores mongoDB RDBMS Depth of Functionality Friday, July 23, 2010
  8. 8. Programming Friday, July 23, 2010
  9. 9. ActiveModel? Friday, July 23, 2010
  10. 10. Persistence Friday, July 23, 2010
  11. 11. Querying Friday, July 23, 2010
  12. 12. Named Scopes! Friday, July 23, 2010
  13. 13. Named Scopes! Friday, July 23, 2010
  14. 14. Named Scopes! Friday, July 23, 2010
  15. 15. 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
  16. 16. Validation Friday, July 23, 2010
  17. 17. Administration Friday, July 23, 2010
  18. 18. Replication • M -> S • M -> S* • Replica sets [aka clusters] coming in v.1.6 Friday, July 23, 2010
  19. 19. Sharding Friday, July 23, 2010
  20. 20. Questions? Radamanthus Batnag rad@infinite.ly Friday, July 23, 2010
  21. 21. 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

×