It comes as no surprise that MongoDB people are speaking quite often about migrating from MySQL to MongoDB considering that is part of their strategy. Anyways this is not the main point that caught my attention in the linked interview.
When ☞ asked about migrating a project from a relational database to MongoDB, Kristina Chodorow and Michael Dirolf identified 4 phases:
- Get to know MongoDB. Download it, read the tutorials, try some toy projects.
- Think about how to represent your model in its document store.
- Migrate the data from the database to MongoDB, probably simply by writing a bunch of SELECT * FROM statements against the database and then loading the data into your MongoDB model using the language of your choice.
- Rewrite your application code to query MongoDB through statements such as insert() or find().
from which the most important/time consuming is the model:
Design is critical, and there are trade-offs that provide no simple answers but require a careful understanding of your application. Migrating the data and rewriting the application are straightforward by comparison.
This sounds extremely similar to what I’ve written in The role of data modeling with key-value stores (nb you can ignore for now the particularities of key-value stores) and also in NoSQL data modeling. It’s great to see such validation for our articles!
You’ll probably find interesting the following slides from Hayes Davis (@hayesdavis) which are emphasizing the following critical questions:
- Is my data relational?
- Do my data access patterns lend themselves to denormalization?
- Do I expect a lot of schema change?
- Can I drop ACID?
- Do I want to support a new piece of infrastructure? (note complexity is a critical dimension that you have to consider)