Skip to content Skip to sidebar Skip to footer

Sql Server 2012 Diagram Tool

Here's a recommendation I ended up using (after a lot more research and trying many different options):

Use plain Visio for this.

Here's why.

Explanation of this approach:

There is no tool that conveniently satisfies all mentioned requirements, not even one that fulfills the main requirements only. Visual Studio 2012 comes close, but lacks theming support and didn't work very well for a large number of tables.

The following process worked for me:

  1. Create a blank Visio Flowchart1 template. Choose a design you like. Set the page and print sizes to something you want (I chose landscape A3 format and the "Linear" theme).

  2. Open a query2 in SSMS on the side to get the details you'll need later: tables, column names, and IS NULL info.

  3. Start adding the tables one by one. Choose manually which tables and columns you which to include.

This is an example of what the end result looks like:

zoomed in example

Or a zoomed out screenshot of the entire model (because it was manual labor I chose to include significantly less than all 100+ tables):

zoomed out example

The procedure I used to make the "tables" look as they do:

  • Headers are bold and a larger font size.
  • Separators aren't lines but just a series of bold dashes after eachother.
  • Four "sections": TableName, Primary Key, Foreign Keys, plain columns.
  • Bold for NOT NULL columns.
  • White for TableName and separators, black for column names.

In addition, I chose for foreign keys to:

  • Never allow crossing connectors, and instead creating small "reference" blocks that refer to a table that's somewhere on the other side of the model.
  • Not include all tables (i.e. there are more foreign keys than connectors).

Hopefully the above will be of use to others too.

Requirements from the question:

As a bottom line, I do recommend this approach, mainly because you end up with a visually appealing model and a high degree of control. This approach doesn't fit the entire bill though. Here's how it holds up to the requirements:

Data connectivity:

  • SQL Server 2012 databases
  • Reverse engineer tables with all columns and Primary/Foreign Key indications
  • Reverse engineer foreign keys as connectors between tables

± This is all possible but not automated. So "more or less".

Control and visuals:

  • Manual layouting, basic theming, able to choose which items to show
  • Able to handle complex models, e.g. 100+ tables

Yes, this all works very well with plain Visio.

Moneys:

  • At least a free trial available

AFAIK there's a free Office trial available. I haven't looked into this though as I have Visio.

Other:

  • Exporting to various formats
  • WYSIWYG;

Yes, this is available in Visio.

Bonus Points:

It has about half of the bonus points:

  • runs on Windows 8
  • SQL 2008 also supported
  • pretty
  • friendly learning curve

1. I've also tried the UML template and shapes but this has infuriating behavior for connector routing. Not recommended!

2. This was my query:

                      SELECT  t.name TableName,           c.name ColumnName,           CASE WHEN c.is_nullable = 1 THEN '' ELSE 'BOLD' END AS IsNotNullable   FROM    sys.tables AS t           JOIN sys.columns AS c ON t.object_id = c.object_id   WHERE   c.name NOT IN ('Excluded1', 'Excluded2')   ORDER BY t.name,           CASE WHEN c.name = t.name + 'Id' THEN 0                WHEN c.name LIKE '%Id' THEN 1                ELSE 2           END,           c.column_id                  

Source: https://softwarerecs.stackexchange.com/questions/1747/free-software-to-reverse-engineer-existing-complex-database-diagrams-in-sql-serv

Posted by: kaseykaseyvanderlindeowe0266805.blogspot.com

Post a Comment for "Sql Server 2012 Diagram Tool"