Switching to MongoDB: The challenges of translating database schemas
summary
Claim: migrating from Postgres to MongoDB is often unnecessary and surprisingly hard but feasible with tooling. The team builds and demonstrates MongoDB Relational Migrator on an example app Conduit (FastAPI + SQLAlchemy + Postgres), copying tables to collections, embedding tags into article documents, adding indexes, and using CDC/Kafka for large or live datasets. Results: queries on embedded tags become faster, joins are slower, transactions exist, and document semantics change (beware the 16 megabyte document limit and that embedded tag edits no longer propagate globally).
AI-written summary · about
chapters (16)
- 0:00Introduction to MongoDB
- 1:30Data storage methods
- 2:35Migrating to MongoDB
- 4:21MongoDB Relational Migrator
- 4:43Conduit PostgreSQL schema
- 6:12Relational vs document modeling
- 8:40MongoDB data structure
- 9:23First migration attempt
- 12:14Relational schema challenges
- 14:00Optimizing MongoDB structure
- 16:58Relational vs MongoDB models
- 17:18Large documents and 16MB limit
- 19:02MongoDB performance strategies
- 21:29Code refactoring implications
- 23:14Complexity of data migrations
- 23:35Q&A on migration
related talks
25mCourting Mongo, committing to Postgres: Our data love story!
30mHelp! I Need To UnSQLize My Application
43mHelp! I Need To UnSQLize My Application
40mData Migration Lessons from the Trenches
43mCRIMS: The case of the DB change that left no trace
42mFrom MongoDB to Postgres: Building an Open Source Standard for Document Databases
32mFrom MongoDB to Postgres: Building an Open Standard for Document Databases
32mMoving MongoDB Workloads to Postgres with FerretDB
