software solutions / project leadership / agile coaching and training

Local, recreateable development databases

Posted on August 15, 2012

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.

1 Comment »

  1. I totally agree. Each developer should work under their own copy of a database. Nothing is more annoying than tracking down random errors that you think you caused, when in fact, someone changed something on the community database.

    I’m a firm believer a database schema, and lookup table data need to be under version control. At any point you should be able to go back in history and say “Yep, this is the right database schema for this version.”

    How? Either by one huge create script, using a model to database generator (Ex. Code First Entity Framework, rake, etc.), or some other tool.

    If work in the MSSQL world, and willing to drop the dime, I recommend SQL Connect, and/or SQL Compare Pro from RedGate. I love their tools.

    Happy Coding,

    Justin Kohnen — August 15, 2012 @ 12:03 pm

Leave a comment

I have over 15 years of software development experience on several different platforms (.NET, Ruby, JavaScript, SQL Server, and more). I recognize that software is expensive, so I'm always trying to find ways to speed up the software development process, but at the same time remembering that high quality is essential to building software that stands the test of time.
I have experience leading and architecting large Agile software projects and coordinating all aspects of a project's lifecycle. Whether you're looking for technical expertise or someone to lead all aspects of an Agile project, I have proven experience from multiple projects in different environments that can help make your project a success.
Every team and every situation is different, and I believe that processes and tools should be applied with common sense. I've spent the last 10+ years working on projects using Agile and Lean concepts in many different environments, both in leadership roles and as a practitioner doing the work. I can help you develop a process that works best in your organization, not just apply a prescriptive process.
Have any questions? Contact me for more information.
Ditching the Office - How an everyday corporate development team turned into a remote working team
From Stir Trek 2018
From Stir Trek 2017, cbus.js 2017
Iteration Management - Your Key to Predictable Delivery
From Stir Trek 2016 and QA or the Highway 2015
From CodeMash 2016, QA or the Highway 2014, Stir Trek 2012
The Business of You: 10 Steps For Running Your Career Like a Business
From CodeMash 2015, Stir Trek 2014, CONDG 2012
From Stir Trek 2013, DogFoodCon 2013
(presented with Brandon Childers, Chris Hoover, Laurel Odronic, and Lan Bloch from IGS Energy) from Path to Agility 2012
From CodeMash 2012 and 2013
(presented with Paul Bahler and Kevin Chivington from IGS Energy)
From CodeMash 2011
An idea of how to make JavaScript testable, presented at Stir Trek 2011. The world of JavaScript frameworks has changed greatly since then, but I still agree with the concepts.
A description of how test-driven development works along with some hands-on examples.
From CodeMash 2010
From CodeMash 2010