DataDude, or as it’s more formally known – Visual Studio Team System 2008 Database Edition GDR (*phew*) has been released for a few weeks now and I spent part of today showing a number of people how it all fits together.
By the way, if you already have the 2005 edition installed, go get this version right now. The improvements it makes over the 2005 version are massive – this product is now a useable and worthwhile addition to your toolbox, plus it supports SQL2008 databases.
The project system is now quite different. The biggest (and I think the most needed) change was the separation of the build process from the deployment process. You can now build the project to make sure that your SQL is correct without creating a deployment script. When you build you get a DBSCHEMA file with you database definition in it. Deployment is also improved with the option to just create the deploy script to target a database or you can create the script and run it against your target database in one operation:
The project file itself is now structured in a simpler manner with specific configuration files for various aspects of the configuration and deployment:
Oh – I should also mention this one : no more design time database! Yay!! DataDude now uses the SqlServerCE data engine for checking syntax and no longer creates those temporary databases with the GUIDs in the name. Of course it does mean you need SqlServerCe (3.5 SP1) installed otherwise you might run into errors opening database projects with “Could not load assembly…” errors.
Another very cool addition to DataDude is the inclusion of FxCop style code analysis rules. While you can’t ensure that your SQL code is brilliant, you can at least be sure it doesn’t completely suck and break common rules. As you can see it includes checks for things like the use of @@IDENTITY and SELECT * … etc.
The Schema View window
One of the other painful things about the 2005 edition of data dude was the schema management. With 2005 by far the easiest way to edit your schema was to make changes via management studio and then do a schema comparison to bring the changes you wanted into your project. While you can still do this it’s now pretty easy to manage the schema inside visual studio since there is a Schema View window with all the various things you might expect.
You still edit the table definitions using SQL (no designers) but it’s pretty simple to manage this stuff now.
What’s also nice is the improved things you can do in the schema view window as seen here:
Apart from much improved database refactoring support, there is now also the ability to view the dependencies of an object – both the things depending on it, and the things it depends on. This really helps in understanding what you’ll be breaking when you make those crazy schema changes your thinking of :-).
Woo-hoo!! Unit testing for stored procedures is very, very nice now. To get started with a unit test hit the Create Unit Tests… button
Run through the dialogs and you’ll end up with a generated test that looks something like this:
See all that SQL code calling the proc? What’s it doing inside a *.cs file? Well, DataDude has added a designer experience to the database unit tests. You can now write some SQL and add your test conditions from a list. Test conditions are adjusted through the properties pages for each condition.
You can also do pre & post test scripts as well which can be very handy.
Behind the scenes you have normal code so if you really wanted to you can always go and add further code to assert and test conditions to suit whatever the specific needs are that you have
There’s a whole slew of other changes in the new version of DataDude and all of them are valuable and probably deserver a blog post in their own right, but these three areas of improvement are to me the changes that make the most difference. If you want to know what the other changes are, go and check Gert’s blog where he gives a run through of each of them or go and grab the documentation and have a read of it for yourself – even better, go download it and have a play with it yourself and discover the improvements.