Tuesday, June 23, 2009
Databases and Refactoring
Perfectly normalized database schemas are an anathema to having well factored code in the long term. The problem is even a simple refactoring like "Rename Column" is a tremendous amount of operational risk, and simultaneous work in all dependent services. The more I have worked in cases like this, the more I favor storing any field which doesn't need to queried on as part of a JSON blob. These are structured, human readable, easily read from almost any type of client, and much easy to put in policies to do with versioning and deprecation without risking an outage.