Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Document Your Database Expand / Collapse
Author
Message
Posted Friday, December 29, 2006 11:16 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, May 8, 2013 7:23 AM
Points: 199, Visits: 136
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/rVasant/2784.asp
Post #333506
Posted Thursday, January 11, 2007 3:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 13, 2014 12:32 AM
Points: 3, Visits: 28
Decent advice.

Most design methodologies (especially agile methods) have heavy documentation requirements for a project - not only does it ease position transfer such as job replacements, but also, it really helps to have documentation of stuff you wrote yourself a couple of months/years ago when you need to work on it again. Good naming conventions of columns and variables also go a long way to clearing up understanding of old code/tables.

I like the ability to comment on a table column directly. The closer to the actual usage a comment is, the more valuable I rate it.
Post #336103
Posted Thursday, January 11, 2007 4:44 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 1:39 AM
Points: 162, Visits: 508

Good Thing you have been introduced

it really help in documentation ... related thing........

 

 

Post #336113
Posted Thursday, January 11, 2007 5:06 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 6, 2011 7:52 AM
Points: 80, Visits: 44

Hi,

about Tools: I made good experiences with Enterprise Architect from Sparx Systems . It is a software modelling tool. http://www.sparxsystems.com.au/

You can import DDL Schemas by using OLEDB and ODBC connections to many database systems. The tool reads the extended Properties from SQL Server Objects and from others (DB2).

You can edit the DDL with a GUI and export DDL scripts.

Best regards,

Stefan




Kindest Regards,

SK
Post #336117
Posted Thursday, January 11, 2007 6:41 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, January 9, 2009 8:23 PM
Points: 22, Visits: 6

From my experience it's not just about documenting the objects, but how they're accessed and their purpose; and ensuring that the documentation is up to date.  MS Word, as the author suggests, requires someone to keep it up to date; and we all know how well that turns out.  There are many tools out there, all with their good points, but I personally wouldn't ever consider one which didn't offer me the ability to run as part of a build, or nightly task.

On the subject of tools; my shameless plug is for DBDocumentor from Pikauba Software (http://www.pikauba.com/DBDoc/details.htm).  It works from the SQL sources so it won't be for everyone, but the tradeoff is that you can get information about result sets and data accesses/modifications.  It also has support for SSRS RDL, so that's a good bonus.

Cheers

 

 

 

Post #336135
Posted Thursday, January 11, 2007 7:26 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 12:21 PM
Points: 1,327, Visits: 155
I recently saw a pretty good product for a affordable price.  SQLSpec from Elsasoft (http://www.elsasoft.org/) was actually written by a member here http://www.sqlservercentral.com/forums/userinfo.aspx?id=145142.  It does not do HTML Help files like ApexDoc, but seems to cover the features pretty well.  It can also help to document application access (though you have to put the links and info in via an additional XML file).  And for $50, it certainly more affordable than the others listed here.



Mark
Post #336151
Posted Thursday, January 11, 2007 8:22 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, February 6, 2014 12:59 PM
Points: 801, Visits: 1,962

I've been doing this for quite a while now.  Version before 2005 did not support extended properties for tables well.  I wanted a unified system.  So:

CREATE TABLE [doc_Fields] (
  [TableName] [varchar] (50),
  [FieldName] [varchar] (50),
  [Comment] [varchar] (4000)
) ON [PRIMARY]

I then put my field and table descriptions here.  If the field name is blank, or NULL, then Comment applies to the table.  A little grid based program to make the entry easy and one to generate an RTF file.

Now ported to .Net and using the extended properties it serves us well.  The advantage of the extended properties is that when I generate create scripts the comments come along.  This is also a help to the UI teams.  They can use this to generate tool tips.

 



ATB

Charles Kincaid

Post #336176
Posted Thursday, January 11, 2007 9:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, June 6, 2014 2:13 PM
Points: 147, Visits: 533

This may not have been mentioned in the article because it's too obvious, but I consider a database relational diagram to be one of the most important pieces of documentation for any database.  I usually create one with only the "core" tables but detailed column information and another with all tables including "look-up"s but with less column detail.

I also use the following sql to list tables, columns, and the "Description" text that EM's "Design Table" lets you enter.  I save the results to Excel and add the spreadsheet to my database documentation.

Note: This works on SQL 2000.  I have not tried it on SQL 7.0 or 2005 (yet) but it probably needs adjusting because it uses system tables.

--List tables, columns and column descriptions
select SO.name as 'table', SC.name as field,
ST.name as datatype, SC.length as 'size',
sp.value as 'description'
from syscolumns SC inner join
sysobjects SO on SC.id = SO.id inner join
systypes ST on ST.xusertype = SC.xusertype left join
sysproperties sp on  sp.id = so.id and sp.smallid = SC.colid
where SO.xtype = 'U' and SO.status > 0
order by SO.name, SC.name




Post #336196
Posted Thursday, January 11, 2007 9:26 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, June 6, 2014 2:13 PM
Points: 147, Visits: 533

CORRECTION.  The prior posted sql may have duplicates.  The following should work better:

--List tables, columns and column descriptions
select SO.name as 'table', SC.name as field,
ST.name as datatype, SC.length as 'size',
sp.value as 'description'
from syscolumns SC inner join
sysobjects SO on SC.id = SO.id inner join
systypes ST on ST.xusertype = SC.xusertype left join
sysproperties sp on  sp.id = so.id and sp.smallid = SC.colid
and sp.name = 'MS_Description'
where SO.xtype = 'U' and SO.status > 0
order by SO.name, SC.name




Post #336205
Posted Thursday, January 11, 2007 11:24 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, February 6, 2014 12:59 PM
Points: 801, Visits: 1,962
You are right. Just tried it in 2005 and it fails.

ATB

Charles Kincaid

Post #336231
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse