This blog has, IMO, some great resources. Unfortunately, some of those resources are becoming less relevant. I'm still blogging, learning tech and helping others...please find me at my new home on

Monday, November 2, 2009

SQL Server Diagramming Wishlist

It can be a frustrating experience using the diagramming features of Microsoft SQL Server Management Studio.  While there have been great improvements in stability and the generated SQL syntax on edits, there leaves a lot to wish for in layout.


Above, I have laid out some of the tables being used in an application I am working on.  The key concept I am trying to diagram in this layout is the concept of a Contact.  It is placed in the center near the top because it is the Most-Important-Table.  Groups of tables in closest relation (by my definition) are placed closer together; peripheral tables are spaced out.  Visually, this works for me and my team and we can see the information on one screen or one printed page easily.

The Problem with Auto Arranging

If I were to use the Arrange Tables feature in MS SQL Server Management Studio, it would redraw my tables as such:


You can see that there is little regard for overlap, I have to zoom out two levels further to see most of my tables and two tables are actually not in view at all.  They are laid out more vertically and will need some serious love if anyone is ever going to look at this for more information about our project. 

Worse still, you can’t tell by looking at this what the Most-Important-Tables are.

A Solution For Layout

First off, I have to admit that when you drop a dozen or so tables onto a diagram and hit Arrange Tables it does a good enough job of moving things around and giving you some space to work with the tables.  But the story shouldn’t end there.

Imagine a Layout Wizard that you could invoke, one that would ask you what the Most-Important-Tables are and then allow you to quickly group tables together that are related not because of high referential counts, but because of business logic.  The wizard would even suggest groups and the Most-Important-Tables.  You would be able to quickly define groups and drag table names into them.  It wouldn’t be responsible, during the information collection, to draw anything out; it would just seek some input from the user.

Take that one step further: create an active layout engine where a tool window allowed you to alter those inputs and change the diagram on the fly.

Improving the Team Story

MS SQL Server Management Studio, especially at the SQL Server 2008 level, is a powerful tool that has grown a lot, but has a lot of room left to grow.

Better automation around the diagramming story – or perhaps, simply more automation features – would help teams better understand concepts related to the part of the model they are working on.  It would allow easier creation of “throw-away” diagrams when new team members are brought on board.  It would allow people unfamiliar with the data model to explore key concepts and more quickly gain an understanding of how the pieces fit together.

No comments:

Post a Comment