We have a fairly large database (in SQL Server 2008) with many tables. We have just bought Red Gate's SQL Doc for documentation purposes. We would like to document this database in a detailed way. What is the best practice in documenting a database? How do you document your attributes with definitions? SQL Doc documents the database nicely but how to add attribute definitions to this document (is there some automagigal way)?
views:
51answers:
3We use extended properties to "tag" constraints, tables, indexes, viws, procs, the lot. (we also use SQL doc)
It's mentioned on the interweb quite a lot too
I don't know of any automatic ways of doing this, it's a bit tedious, but worth it. There are a few ways to do this, one through the table designer (right clicking on a table, and choosing "design") and entering text into the "Description" property on each column, or you can also use the Database Diagramming Tool as described here:
http://devtoolshed.com/content/sql-create-table-add-description-column
You should check out this question on how to add a description to a column. http://stackoverflow.com/q/3754180/444443
This way when you run your update scripts you can add descriptions to columns or tables with the extended properties that GBN mentioned