Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is your preferred document format for documenting databases [closed]

I am in the process of writing an application which, among other functionality, generates MediaWiki documentation of an MSSQL database (objects, tables, table data).

My question is which document formats you prefer, or are required to produce. I have too many ideas to follow, so your answers should set my priorities ;)

(I know there are other documentation-related questions on SO, but they mostly deal with how to generate documentation (I know how to), and do not ask for specific doc types or platforms)

Edit: Thanks for the comments. Actually I have table relations already, since I parse foreign keys. However full cross-reference may be a bit trickier ;)

However the question was meant to ask for the document types, such as Word, PDF, ODF, whatever. What are your professional requirements or preferences?

Update: Overview of generated documentation

like image 751
devio Avatar asked Jan 11 '09 23:01

devio


People also ask

How do you write a documentation for a database?

Documentation overviewTable and column descriptions imported from extended properties (MS_Description property set by SSMS). Table and column relationships (foreign keys) Table triggers. Object dependencies.

What is a database design document?

The document describes, how the database that will support the [Application] Data Model with details of the logical and physical definitions. The document provides the functional and non-functional usage of the tables, considerations and requirements.

What is the purpose of database documentation?

Document databases make it easier for developers to store and query data in a database by using the same document-model format they use in their application code. The flexible, semistructured, and hierarchical nature of documents and document databases allows them to evolve with applications' needs.


1 Answers

It sounds like you have already decided on a document format, which is HTML based on MediaWiki markup.

Also you should generate Entity-Relationship Diagrams which are useful additions to database documentation (though ERD's don't tell the whole story either).

Do you mean document organization, i.e. what headings and content should be included in each page?

Here are some suggestions:

  1. Table Structure

    • Column names, data types, constraints
    • Meaning and usage of each column
    • Extra logical constraints in triggers and application code
    • Indexes defined
  2. Relationships to other tables

    • Tables dependent on this one
    • Tables this one depends on
    • Notes on special or implicit relationships, that have no enforcement through database constraints
  3. Usage of table

    • Usage in stored procedures
    • Usage in application code
    • Usage in views
    • Who has read and/or write access; SQL privileges of each user or role

There are other questions at StackOverflow that are very close to this one.

  • "How to document a database" is a very similar question to yours, since it's specifically about wiki documentation solutions.
  • "What are the best ways to understand an unfamiliar database" may give you some good tips, as you are creating documentation that would help someone in that situation.
  • "How do you document your database structure?" is related but not as closely, because it's about putting documentation into the metadata itself.
like image 175
Bill Karwin Avatar answered Oct 12 '22 12:10

Bill Karwin