Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice for managing data-model changes in a released system

I am about to embark on the development of a web application project.

I'd like to get something up early and often for early adopters to play with and feedback.

But I envisage the data model changing as the project progresses and my understanding of the system improves.

How should I manage the dilemma of updating the data model appropriately and preventing data loss for early adopters? Should I simply put up a big warning saying "user beware", or should I put in the effort to create migration scripts?

like image 295
Ben Aston Avatar asked Dec 30 '08 15:12

Ben Aston


People also ask

How do you maintain data models?

Analyze the relationship between entities and Create foreign key relationship (one to many or many to many) between those entities. Create subject areas and add relevant entities to those subject areas. Align the objects in the main subject area and other subject areas. Validate the data model.


2 Answers

What platform are you using? Ruby on Rails gives you migration scripts as part of the package. If you're in Java-land, you might want to check out migrate4j.

In the end, I'd suggest doing both things: Warn your users that they're using alpha software, and employ migration scripts with the intent of preserving their data whenever you can (lest they become peeved and lose interest).

like image 155
bradheintz Avatar answered Sep 28 '22 21:09

bradheintz


Scott Ambler has written some nice stuff about agile databases. There's a book and a website.

like image 35
duffymo Avatar answered Sep 28 '22 19:09

duffymo