Ask HN: How did you migrate from Mongo to a relational database?
Have you managed to move from Mongo (or some other NoSQL / NoSchema database) to an RDBMS? What considerations did you have to make? Any traps or pitfalls?
It seems to me there are two basic approaches:
1. Create migrations for the data, and rewrite all queries. Test thoroughly, then flip the switch and move everything to the new DB
2. Create migrations, then keep the two databases in sync while rewriting queries, until all queries are migrated and Mongo can be turned off.
Approach (1) seems both difficult and risky, but means I don't have to keep data in sync, which seems to me to be the big risk of approach (2).
I'd love to hear your thoughts!