MongoDB to MySQL the How and the Why
summary
A large Rails social project starts on MongoDB with MongoMapper, accumulates thousands of users and complex linked social graphs, then migrates to MySQL because document storage forces manual joins and slows development. The team exports with mongoexport to CSV, converts and imports with batch inserts, LOAD DATA INFILE and active_record_import, uses 10k–20k batch sizes, keeps a Legacy ID column to reconcile Mongo GUIDs, accepts about two hours downtime, and ends up with faster iteration after MongoDB → MySQL conversion.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 8:28Why diaspora chose MongoDB
- 16:43Social data is relational
- 24:04Development friction with MongoDB
- 27:54Mapper problems in practice
- 28:16Migrating to MySQL
- 35:08Q&A
related talks
27mMurdering our Mongo Database (or how we migrated to a relational database)
27mMongo: An unexpected journey
37mData Migration With Confidence
15mDo's and Dont's of the modern hybrid mongoDB MySQL environment
29mSwitching to MongoDB: The challenges of translating database schemas
37mDenormalizing Rails
59mLarge Scale MySQL Migration to PostgreSQL
30mHelp! I Need To UnSQLize My Application
