Data Dictionary Creator

[Tool] Data Dictionary Creator - Rapid database documentation

[UPDATE] A newer version of DDC has been released to Codeplex

Summary

Data Dictionary Creator (DDC) is a simple application which helps you document SQL Server databases. It stores all the information in Extended Properties, so it's easier to keep the documentation in sync with the database as it changes. You could do a lot of this through SSMS (SQL Server Management Studio), but

  1. It's a lot more work, which means it's a lot less likely to be kept updated.
  2. The SSMS approach only gives you one column (Description); DDC gives you as many as you want. That's probably one of the best features DDC adds - it lets you tailor your documentation to your database and business.
  3. SSMS requires you to write your export via tricksy SQL; DDC exports to WordML, Excel, HTML, and XML.

    Download DataDictionaryCreator from CodePlex.
    <script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>

How to use it

Connect to database

Enter a connection string (you know the drill). You can alternatively double click the connection string textbox for the standard data connection (DataLink) dialog. The connection string box turns light blue (as shown below) when you're connected.

Set up any Additional Properties you want to track

The Additional Properties box takes a comma delimited list of properties. In the example above, I've included a Source and Audit column. You can change it at any time, so don't worry about it too much if you're not sure right now.

Auto Fill the key column descriptions

Click the "Set descriptions for all keys" button to automatically pre-fill descriptions for all primary and foreign key columns. This is optional, but it saves some work and helps you to see some progress quickly.

Fill in the descriptions

Go to the Edit tab and do the actual work. Nope, there's no GhostDoc action here - you have to fill in the information. It's pretty easy to do, though - select a table, fill in the table description, and fill in some documentation fields. All changes are saved as you work (when you leave each grid cell). Then pick another table and continue. You can do as much or as little as you like; you can make additional changes whenever you want.

Notice that the Audit and Source columns have been added based on my previous settings. 

Export

Go back to the Setup tab and click the Export button. You can select HTML, Excel, WordML, or XML. All exports go first to a native XML format, then through an XSL transform, so you can customize the export by modifying the XSLT files or use them as the template for a transform to any other format you'd like.

Repeat

The best part of this is that it's not a one time thing. Anyone who works on the database can continue to update the documentation as they go.

How would you do this in SSMS?

Oh, you're still stuck on that, huh? Okay, if you want to do this through SQL Server Management Studio (SSMS), the best way is through the Database Diagram interface. Editing through the Modify Table screen is really inefficient since you can only update the description for one column at a time. The Database Diagram screen has a custom view which allows you to add the description column so you can update all column descriptions for a table at a time.

Here's how to set that up

  1. Create a table database diagram
  2. Switch the table view to "Custom View" - right-click the table name and select custom view
  3. Customize the view - right-click the table, select "Modify Custom", and add the Description as shown in the screenshot below

That helps a bit, but you need to go to each table to make updates. If you want to export it, take a look at Raymond Lewallen's SQL script to generate a data dictionary table.

Tech Stuff

I made heavy use of the SQL Server Management Objects (SMO) provided with SQL Server 2005. They make dealing with database metadata really easy, so I could concentrate on the harder stuff, like setting up control containers and persisting user settings. ;-) The source code is included under BSD license, so feel free to take a look and reuse anything you find useful. Please submit any changes you'd like me to include in the next release. The easiest thing to modify is the export XSLT files, which are pretty plain right now.

Minor Update 9/29/06

Version 1.1.0 adds:

  • T-SQL export to allow copying documentation between database instances (thanks, Tyler!)
  • Loads previously used additional properties from database on connection (thanks for the suggestion, Phil, although you made me do all the work...)
  • User interface inhancements (thanks, Phil)
  • Bug fixes (I wrote 'em, I fixed 'em)

 

Published Thursday, September 28, 2006 10:03 AM by Jon Galloway Filed under: , ,
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值