Versioning your database project

If a software project uses SQL Server in some capacity, you are going to have some developers who write very good C# code who at the same time are literally butchering the database component.

 “Source control the database? How can that possibly work?”

“This is madness! Madness I tell you!”

 “I’ve been in the software business for almost 2 weeks now, and I can tell you that it is a waste of time versioning your database”

 (But you shouldn’t just version databases… you should version everything in your project. Even the bitmaps and icons. Third party assemblies you might get away with, but your life will be easier if you add those to your system source control and label them with a release as well)

Microsoft has made life easier with the good ‘Visual Studio Team System 2008 Database Edition’ proving that you ‘can’ actually have project structure and SQL… but to me it suggests that you need such a tool to get this job done when in fact you do not. You only need a healthy strategy

Jeff Atwood has two good blog entries on this subject:

 Is Your Database Under Version Control?

Get Your Database Under Version Control

It doesn’t require you to buy some magic tools.. all you need is SQL Server and Source Safe (Or you favorite source control system).

Once you get your team kicking and screaming to database source control (expect a quantity of blood) then you can REALLY make a difference to project quality by implementing Database Unit Tests!

2 thoughts on “Versioning your database project

  1. Once you version control your database in Team System Database Professional can you check-in and check-out through SQL Managment Studio 2005 or 2008 or are you restricted to use Visual Studio?

  2. I can’t try it out right now, but Management Studio is actually based on Visual Studio, and if you go into ‘Options’ you will find a connection option to a source control system.

    I think this might work only with the little used ‘Solution Explorer’ view in SSMS…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s