[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.

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: , ,

Comments

# Database Dictionary Tool

Database Dictionary Tool

Thursday, September 28, 2006 1:51 PM by you've been HAACKED

# Data Dictionary Creator

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Thursday, September 28, 2006 5:57 PM by DotNetKicks.com

# Tag Your Database - A Data Dictionary Tool

Tag Your Database - A Data Dictionary Tool

Friday, September 29, 2006 5:38 AM by Creative Minds

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Nice stuff.  Mine doesn't look as pretty (buttons and window's elements) as yours though, so I am a bit jealous.  You even spoil us with the source included.  Awesome!

Friday, September 29, 2006 2:07 PM by Willie Tilton

# Data Dictionary Creator

Do you need to document your SQL Server database? Data Dictionary Creator from Jon Galloway may be able to help you out with this tedious task. I had the app downloaded and working in about 15 minutes. Quick Start:

1. Download the application and run

Friday, September 29, 2006 2:13 PM by JohnnyCoder

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Hi Jon,

Great tool! Tried it immediately to document a database I'm working on. I came across a small problem on MainForm.cs Line 176:

table = db.Tables[ddlTables.Text]; gives me a nullreferenceexception.

It didn't see any of the tables in my database. Then I saw the overload and tried setting the schema explicitly:

table = db.Tables[ddlTables.Text, "dbo"];

This one worked. Obviously, this works for me now, but it fails when the tables are in another schema. I didn't dive in it to deep so I don't know what might cause this. Just thought I mention it.

Monday, October 02, 2006 6:34 AM by Jeffry van de Vuurst

# re: [Tool] Data Dictionary Creator - Rapid database documentation

@Jeffry - Thanks for letting me know. I'll take a look at that for a bugfix release.

Monday, October 02, 2006 12:27 PM by Jon Galloway

# re: [Tool] Data Dictionary Creator - Rapid database documentation

from the comments:

>you've been HAACKED

>You've been kicked

What a violent place!

top work Jon.

Monday, October 02, 2006 11:09 PM by lb

# New Database Documentation Tool - Data Dictionary Creator by Jon Galloway

In the continuing battle over database documentation, Jon Galloway has released a new .NET 2.0 weapon...

Friday, October 06, 2006 1:52 AM by Thomas Williams

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Great tool! I am not sure you take feature requests :) but it would be great if:

- the list of additional properties was refreshed in the edit view when you toggle between edit and setup and you added a new extended property

- you had an import function

thanks again for such a good tool!

Monday, October 09, 2006 10:50 AM by Mike

# re: [Tool] Data Dictionary Creator - Rapid database documentation

@Mike - Thanks for the feature requests, I'll try to add them to the next version. You can work around both of these, though:

(1) Additional Properties are refreshed when you select a new table.

(2) You can export to SQL scripts which add all the extended properties to a database. You have to run them in Query Analyzer at this point, but I could change it so that DDC can execute the scripts if you tell it where they are.

Monday, October 09, 2006 11:27 AM by Jon Galloway

# Visual Studio for Database Professionals and other Cool Data Management Tools for .NET

Earlier today CTP6 of the Visual Studio Team Edition for Database Professionals was made available for

Wednesday, October 18, 2006 11:00 AM by Community Blogs

# re: [Tool] Data Dictionary Creator - Rapid database documentation

I've tried numerous times to dowload from the download link, but I get an error in both IE and FireFox at about 97%. IE reports that the server has reset the connection. Got any advice on how to download this file?

Saturday, October 21, 2006 11:19 AM by sosoqool

# SqlSpec is worth a look

I can recommend SqlSpec as a very comprehensive data dictionary generator.  It's available at http://www.elsasoft.org.  It has excellent testimonials, also a very positive review on sql-server-performance.com.  Definitely worth checking out.  Besides, I wrote it. :)

Friday, October 27, 2006 7:23 AM by Jesse

# Friday thoughts (Oct 27, 2006)

I'd been meaning to post a write-up on how to create a simple SpreadsheetML document from scratch, but

Friday, October 27, 2006 5:29 PM by Brian Jones: Open XML Formats

# Showing a Connection String prompt in a WinForm application

When I was putting together the Data Dictionary Creator program, I needed to allow users to input a connection

Monday, October 30, 2006 1:45 AM by Jon Galloway

# Only a Stuppid Message

Oooh....it's just wastage of time, when i tried to download it gave error......so be concious.

               Bye Bye

Tuesday, October 31, 2006 11:16 AM by Ehtasham ur Rahman

# re: [Tool] Data Dictionary Creator - Rapid database documentation

@Ehtasham - Can you be more specific about your error? Over 1300 people have downloaded the program and I haven't had any fatal error reports.

Tuesday, October 31, 2006 11:59 AM by Jon Galloway

# re: [Tool] Data Dictionary Creator - Rapid database documentation

tools of data dictionary

Wednesday, November 01, 2006 5:59 AM by waqas missan

# re: [Tool] Data Dictionary Creator - Rapid database documentation

its nice ,helpful 4 working with SSMS i enjoyed that

Wednesday, November 01, 2006 6:33 AM by tania

# re: [Tool] Data Dictionary Creator - Rapid database documentation

i wana know about more tools

Wednesday, November 01, 2006 6:36 AM by tania

# re: [Tool] Data Dictionary Creator - Rapid database documentation

I need to extract DTD's from government fillable MSWord docs.  My goal is to create my own document in html with fillable fields from the data fields which are viewable in the bookmarks. Help!@@#%$

Wednesday, November 01, 2006 6:10 PM by Gary Drury

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Great tool. Saved me a lot of time. I was tring to find the sql command to retrieve the table description. Can you point me in the right direction. I want to have a T-SQL script that will build it all on the fly.

Thanks.

Tuesday, November 28, 2006 12:19 AM by jue-AN

# re: [Tool] Data Dictionary Creator - Rapid database documentation

This is a really cool tool. Thanks a bunch for saving me a lot of time..

Thursday, January 11, 2007 4:33 PM by Pavan

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Hi Jon

Kewl tool! Really helped me document the table structure of a legacy database that I'm working on.

Is it possible to use it to document metadata on other database objects like views, stored procedures, UDFs etc?

Monday, February 12, 2007 11:22 PM by Patrick Dadey

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Is there a way to print the output produce by the data dictionary? thanks

Friday, March 02, 2007 9:23 AM by rosalyn

# re: [Tool] Data Dictionary Creator - Rapid database documentation

@rosalyn - You can export to a lot of printable formats: Excel, Word, HTML.

Friday, March 02, 2007 12:52 PM by Jon Galloway

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Jon,

Does the version of DDC I've just downloaded from the VelocIT site work with SQL Server 2005 as well as 2000, or should I download the updated version from CodePlex?

Please let me know!

Thanks,

Molly Gartrell

Thursday, June 28, 2007 6:34 PM by Molly Gartrell

# re: [Tool] Data Dictionary Creator - Rapid database documentation

@Molly - Codeplex is the best place to get the latest version of DDC, but all versions of DDC will work with SQL Server 2005.

Thursday, June 28, 2007 7:40 PM by Jon Galloway

# re: [Tool] Data Dictionary Creator - Rapid database documentation

I NEED HELP, I´M TRYING TO DOCUMENT A SQL2000 DATABASE AND EVERYTHING WORKS PERFECT, BUT WHEN DDC IS EXPORTING TO EXCEL, WORD OR WHATEVER IT IS DDC FREZZES AND THE PROGRESS BAR STAYS WITH ONE GREEN SQUARE... I CANT SEE ANY PROGESS IN THE BAR.. AND I CHECK IN THE FOLDER WHERE THE FILE SHOULD BE AND THERE´S NOTHING.

Tuesday, October 09, 2007 11:46 AM by DDC NEWBIE

# re: [Tool] Data Dictionary Creator - Rapid database documentation

I should have read the previous comments.  Just like the others I also got an error upon downloading it.  Please check back and update everything.  You must have missed something.

Monday, November 12, 2007 2:12 AM by portrait artist

# re: [Tool] Data Dictionary Creator - Rapid database documentation

What a nice and high quality tool, Jon.  Thanks so much!  I have one word for you: Lifesaver.

Wednesday, December 19, 2007 12:34 PM by John E

# re: [Tool] Data Dictionary Creator - Rapid database documentation

Just a small question... Is it possible to generate the script for the entire database creation from the tool? It would be great if the tool does that too... Saves a lot of time having to generate the scripts (particularly if it can generate the script based on the order of dependancies ;)

Great work though!

Monday, January 14, 2008 8:01 AM by Shiva

# New Database Documentation Tool - Data Dictionary Creator by Jon Galloway

New Database Documentation Tool - Data Dictionary Creator by Jon Galloway

Sunday, June 29, 2008 7:16 AM by Thomas Williams Tech Blog

# Stupid Trackbacks! by JohnnyCoder

Pingback from  Stupid Trackbacks! by JohnnyCoder

Tuesday, October 28, 2008 3:00 PM by Stupid Trackbacks! by JohnnyCoder

# re: [Tool] Data Dictionary Creator - Rapid database documentation

I need a free dictionary tool for seraching fast words.

I wnat to download

Thursday, November 20, 2008 3:13 AM by Dictionary Tool

Leave a Comment

(required) 
(required) 
(optional)
(required)