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

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

Leave a comment





SERVICES
SOFTWARE SOLUTIONS
I have over 10 years of software development experience on several different platforms (mostly Ruby and .NET). 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.
PROJECT LEADERSHIP
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.
AGILE COACHING
I believe that Agile processes and tools should be applied with common sense. I've spent the last 6 years working on Agile projects as a consultant in many different environments, both in leadership roles and as a practitioner doing the work. I can help you find out how Agile can work best in your organization, not just apply a prescriptive process.
TEST DRIVEN DEVELOPMENT TRAINING
TDD Boot Camp is a hands-on, three day, comprehensive training course that will teach you all of the skills, tools, frameworks that you will need to use test-driven development to develop real world .NET applications. If you're not looking for something that intensive, check out the the half-day version.
Have any questions? Contact me for more information.
PRESENTATIONS
The Business of You: 10 Steps For Running Your Career Like a Business
From CONDG 2012, Stir Trek 2014
From Stir Trek 2013, DogFoodCon 2013
From Stir Trek 2012, QA or the Highway 2014
(presented with Brandon Childers, Chris Hoover, Laurel Odronic, and Lan Bloch from IGS Energy) from Path to Agility 2012
(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