Re: database schema documentation
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 9 Feb 2009 22:41:35 +0000 (UTC)
Maciej Gawinecki (mgawinecki@xxxxxxxxx) writes:
1. Just to check: Are this comments preserved in database when
executing CREATE TABLE, ALTER TABLE commands ?
Only if the are with the text for a CHECK constraint. That is, SQL
Server does not store the source code the CREATE TABLE statement
anywhere, it only stores the result of it. CHECK constraints are
an exception, because for these SQL Server to store the text.
Overall, I think the best model is to view everything stored in the
database as binaries, even if it in some cases the binaries are very
faithful copies of the original.
2. Some databases (MSSQL) allows to annotate schema elements (tables,
columns) with additional documentation, which is then stored in the
database. Is it part of the SQL standard? What other databases allows
for that?
Since SQL Server uses system stored procedures to supply extended
properties, it's a safe bet to assume that it is proprietary. I don't
know about other products.
3. I've seen many databases schemas with external documentation,
generated with different documentation tools. I'm particularly
interested in tools that support a designer to annotate particular
schema elements and generate external documentation (PDF, HTML,
DOC ?). What are the most popular tools for schema documentation? (any
survey on that?)
Personally, I use PowerDesigner from Sybase which is a full-fledged
modelling tool. Alas, the price tag is full-fledged too.
An advantage with such a tool is that the documentation is stored
seprately from the database, which means that you can have one instance
of the documentation, but many instances of the databasees without a
problem.
A cheaper solution is SQLDoc from Red Gate. Essentially, they give you a
graphical interface to extended properties, and also a vehicle to produce
a document from it. I haven't checked, but it is not unlikely that
ApexSQL has something similar.
4. What are the most popular formats for documentation output? Any
examples, I can browse to see how they are formated, structured?
Powerdesigner is able to do RTF and HTML. I happen to have an example
of the latter on
http://www.sommarskog.se/AbaPerls/doc/database/abaperls.html,
although this is post-processed by my own tool, to make it a little
less verbose.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- database schema documentation
- From: Maciej Gawinecki
- database schema documentation
- Prev by Date: Re: number of databases in SQL server and performance
- Next by Date: Re: Suggestions request: a book to learn how write efficent queries
- Previous by thread: database schema documentation
- Next by thread: number of databases in SQL server and performance
- Index(es):
Relevant Pages
|