Are there any tools for schema migration for NoSQL databases?

Viewed 6142

I'm looking a way to automate schema migration for such databases like MongoDB or CouchDB.

Preferably, this instument should be written in python, but any other language is ok.

4 Answers

One of the supposed benefits of these databases is that they are schemaless, and therefore don't need schema migration tools. Instead, you write your data handling code to deal with the variety of data stored in the db.

If your data are sufficiently big, you will probably find that you cannot EVER migrate the data, or that it is not beneficial to do so. This means that when you do a schema change, the code needs to continue to be backwards compatible with the old formats forever.

Of course if your data "age" and eventually expire anyway, this can do schema migration for you - simply change the format for newly added data, then wait for all data in the old format to expire - you can then retire the backward-compatibility code.

Related