Local, recreateable development databases

If you’re a developer, do you have your own personal development database that you can recreate at the touch of a button?

If you said no, you’re not alone. In fact, I’ve been in that situation on many projects, where the entire team shares one big development database that is a backup of production, and all schema changes need to be coordinated with the other developers on the team. Usually things are this way because back in the day someone didn’t create a way to have local databases.

We were in the situation and we made the investment to have someone spend a week or two taking a copy of production, deleting all of the data from tables that weren’t lookup tables, and then creating a way to run all of the new SQL scripts against the small baseline copy. Now I can recreate my development database at the touch of a button.

The benefits of this are obvious, but since many people haven’t made this investment yet, let me list them anyway:

  • I can hack up my database and not worry about affecting other developers
  • I can hack up my database and then start over if I screw something up (as opposed to piece things back together so that the rest of the team can keep working)
  • Automated tests that run against the database run MUCH faster
  • No more confusion when someone else on the team changes some important piece of data without telling you
  • I can check out any revision of the code and create the database that existed at that point in time

If you don’t have a local, recreateable database yet, make the investment. You will reap the benefits many times over and you’ll be so glad you did.