June 2006 - Posts

VSTS for database professionals

Today I had a first look at the Visual Studio Team System for Database professionals.

 

As my typical developer client contained Sql2005 developer edition after the flawless install I was stuck immediately when I tried to create a Sql2005 Project. From the READ ME it appeared that this version is dependant on SqlExpress. Those guys must be kidding. After trying to add a client alias to my Sql2005 configuration I checked the Tools|Options dialog. In the Database Tools| Data Connections node, I removed the SQLEXPRESS text, restarted VS2005 and voila, it worked.

 

The first thing to start with is the Import Database schema. A simple dialog lets you select a database. This dialogs still loves SQLEXPRESS because it only showed .mdf files but clicking New Connection brings you quickly to any Sql2005 (or Sql2000) instance. Bare in mind that cross developing is not supported.

After the import the solution explorer tree is populated similar when you use the Server Explorer.

 

For Adding a column to a table I tried to right-click on the columns node. It showed a nice 'Select template' dialog, it was however not populated with any items. Also right-clicking on the table didn't bring up Add Column option. I just opened the table (double-click) and added the column by hand to the script. When I saved the file, the Column was also added to the solution explorer tree. A little bit contra-intuitive but the script interpreting capabilities are ok.

 

The data generation plans do as they promise: the tables in your schema gets populated with data, randomly generated. The datagenerator stores this is an xml file. The only way I could find to change the generated data was to actually edit the xml file. The grid that shows the generated data is sadly enough not editable. Using the databound generator is a better option in that case. If you need to custom generate data you can do this by handcrafting a assembly and coding the generation process. The data can be pushed into a database from the IDE.

 

One of the extremely useful things is the fact that the database project is a MSBUILD project file. This enables the deployment/update of your databases during the daily/continues integration builds.

 

A much needed option is schema compare and data compare. The schema compare is capable of comparing database projects and real databases (both as sources and/or targets). The result is a DDL script that will change the target database in such a way that it matches the source schema. The schema comparer doesn't take into account the retention of data in the target schema.

Therefore a second option exists: The Data Compare. It does what it promises; it compares the data from the source against the target and generates a DDL script. In the Data Compare window you can deselect certain rows which update the script, leaving that particular row untouched.

Having tools for schema- and datacompare is already great. The separation of this important functionality might not always be the most efficient way to create migration scripts from one database to another.

 

Unit testing your database is a real pain. And it is still debated if you need to unit test your database if you are already running unit tests on your datalayer or buisnesslayer. Whatever the opinions are on that subject (and I will not get philosophical) the reason that it is time consuming can be skipped. Right-Click on the stored procedure gives you the option to Create a Unit Test. The IDE creates a C# Unit test project where it requires you to indicate the database connection (the real test database), the databaseproject and the datageneration file to use.

With that done you simply indicate for the Stored Procudure under test what the expected outcome is. Expected outcomes can be Rowcount, filled resultset, empty resultset, scalar value etc. All this is done without the need to program a single line of code. All is done in the outcome grid, and setting the correct values in the properties pane. In case you need to you can change the TSQL that is called during the test run.

 

My initial thoughts on the added value where somewhat grim. But I must admit that this is going in a very good direction. The tool adds much needed functionality during data-driven development. What is missing (and I think Dennis will disagree with that) is a Designer for a graphical representation of the schema. There are cases where a picture tells you more than 1000 words. And adding some Logical modelling capabilities will tie the business-analysts to the VS2005 experience.

I'm going to test-drive this stuff now for a while to see if it really stands-up to the promises.

 

GotDotNet Identity theft

Sometimes funny / unexplainable things happen. Like today when I briefly connected to GotDotnet. The list of ' My projects'  was a lot bigger then last time I logged on. Some where still familiar but some I never heard of. The first thing to spring to my mind was a nice new feature: GotDotnet project relations. As many projects have dependencies on each other (like the Enterprise Library and Service Factory for example) if you join one project you are automatically joined to the related projects. Cool!

Examining the list some projects didn't make any sense to me. And some projects I joined were not on the list any more. Now that made me suspicious. Some thing must be wrong. I clicked 'My Profile' and there it was:

Identity from gotdotnet

I'm not Sankar74, and I do not life in Singapore.... I removed my cookies and temporary internet files, closed IE and tried again. Same problem. On the Messageboard another guy had obviously the same problem and posted in name of Sankar74...

I experimented a little bit and found out that if you hover over the Sign In button on the top of the homepage of GotDotnet the login URL for LiveID/.NET passport is shown in the statusbar. When the id query parameter of that url is 1 you are probably going to be logged on as your second-self. 

If you are planning on conducting some nasty programming against world peace, Microsoft or .Net be aware that in time totally unexpected someone might find out what you are up to when he or she logs on to GotDotNet.

Hopefully the Micorosoft GotDotNet team gets this glitch solved quickly...

 [UPDATE]: The GotDotnet Team fixed the problem on monday and assured that this is not a case of Identity Theft...

Posted by Rene Schrieken | with no comments

Interop and Standards

Today I had a completely new experience with Microsoft. In a meeting we discussed how Microsoft operates in the Standards and Interoperability world.

From the Microsoft HQ, Tom Robertson (General Manager Standards Strategy Group) and Jason Matusow (Director of Standards Affairs) tried to get familiar with how the dutch IT business partners (and their customers) see Microsoft in the Standards battle. The current illustrative battle is about ODF and OpenXML (but a lot more examples passed, in favour and against Microsoft).

Is OpenXML a standard? Is it an open standard? And (as one attendee stated) is it a real standard? If you answered NO on one of these questions what is the reason? Is there any IT company that is a better player in this field? 

It is true that Microsoft has not fullfilled its promises to some standard  claims but to me it is more an interesting  topic for lawyers and attorneys than it is for IT-Architects.

On the end of the day the only thing that counts for our customers is if the application of all those standards and interop capabilites works out for the problem at hand. And that makes that you sometimes have to choose for one standard and in other occasions for the other. As long as the IT-industry thinks that added-value and intelectual property is in the way we communicate or in the way we store data the world of IT-consumers will live with multiple standards and proprieatry interop tweaks. Over time it will be come clear which standards prevail. That might not necessary be the best/smartest standard or interoperability heaven but it will be that with the most used/usefull applications.

Posted by Rene Schrieken | with no comments

Blogcast on Service Factory

If you didn't had a change to look into the Service Factory bits you're self you could bluff your self into service factory with the walkthroughs video's of Don Smith, a program manager on the Service Factory project.

Posted by Rene Schrieken | with no comments

DB modelling, is it finally going to happen?

It was (and is) so easy. Every single soul at Microsoft considered it best practise to directly connect to a database, bring table and columns names right up to the GUI layer, have a framework that mimics your database in memory (and every dev always try to load the whole database into memory).

Strange thing was however that the Visual Studio IDE always lacked any descent support for database modelling. I have tried Visual Modeller (in the VB6 era) but that didn't made me happy. The usage of Visio doesn't need to discussed here I guess. You always had to fallback to other very good tools like PowerDesigner (Sybase) or ErWin. Also Enterprise Architect is good rated.

Now it looks like Microsoft is striking back. The Visual Studio team System for DateBase professionals. That looks promising. Can't wait till June, 11th for giving that tool a test-drive.

[UPDATE]: download here.