Hot answers tagged documentation
30
Microsoft's Visio Pro can reverse engineer a database as can CA's ERwin. Visio is the cheaper option, but ERwin is the more detailed, more complete option. Extended properties are nice, if people bother to look at them. You could also use something like Red Gate's SQL Doc to output documentation in HTML format.
I find naming conventions and properly setup ...
29
I have been using extended properties. They are very flexible. Most standard documentation tools can be driven off MS_Description, and then you can use your own with custom-built tools.
See this presentation: http://www.sqllunch.com/Lunches.aspx?Month=November%202010#
And this code: http://code.google.com/p/caderoux/wiki/LeversAndTurtles
10
If it is ever written, the documentation consists of a word document. A couple of relationship diagrams will be included. Lists of the tables and a brief description of what each table holds and how it relates to other tables. One chapter of the documentation includes the security settings: what permissions does the "user" that the application need?
...
8
In Oracle, you would use the COMMENT command to:
[...] add to the data dictionary a comment about a table or table
column, view, materialized view, operator, indextype, mining model, or
edition.
Most tools (PL/SQL Developer, Toad...) will display these comments in appropriate fields when you browse the database schema.
The comments can be queried ...
8
For SQL Server I'm using extended properties.
With the following PowerShell Script I can generate a Create Table scripts for single table or for all tables in the dbo schema.
The script contains Create table, primary keys and indexes. Foreign keys are added as comments.
The extended properties of tables and table columns are added as comments. Yes multi ...
8
Funny, I was wondering how other people are doing this as well..
While developing my first big database project, I found that Microsoft SQL Server Management Studio 10.0.1600.22 supports database diagrams which you can export to a word document or other documentation software where you can add as much documentation detail as you want. Just expand the ...
8
Take a look at SchemaCrawler - it is my free, command-line tool that I designed to do what you are looking for. SchemaCrawler produces a text file with all of database schema objects. This text output is designed to be both human-readable, as well as diff-able against similar output from another server.
In practice, what I have found is that outputting a ...
7
I use data modeling tools because they allow me to document important information about the database other than what "fits" in a database. Meta data like privacy/security/sensitivity concerns, stewardship, governance, etc.
That may go beyond what some need in documenting a database, but those things are important to the business and helping them manage ...
6
In Oracle there are table and column comments that can be used for documentation.
These comments can easily be added by the following commands:
COMMENT ON TABLE my_table IS 'Documentation of my table'
/
COMMENT ON COLUMN my_table.my_columns IS 'Documentation of my column'
/
5
an user process is a piece of software
that can connect to an oracle server.
You (the user) can start a piece of
this kind of software, then connect to
oracle.
Not quite. A User Process in Oracle is different than a client, which is what I think you are referring to. The user starts a client program (SQL*Plus, Pro*C, etc.), which runs on the ...
4
The RedGate SQL Dependency Tracker tool might be helpful. It can show you graphically which database objects (SP's/views/tables) depend on each other. I've used it while working with some tables I was unfamiliar with to determine the order in which to disable constraints.
I also ran it on the whole database just for fun and it was way TMI. If you are ...
4
The most important thing about documentation is that it makes sense to you. There's no really standard way of doing this.
If you've got lots of stored procedures that all connect to each other starting with a Visio diagram with one object for each procedure, then links between them so you can track how things go from procedure to procedure is probably a ...
4
DB Dictionary Creator
is an open source database documentation tool with decent GUI and export / import options. It uses Extended properties to store the documentation. It'll also generates automatic descriptions for primary key columns and foriegn key columns.
3
Indeed, Extended Properties (MS_Description) is the way to go. Having these descriptions readily available as a part of the metadata could be utilized not only by docs generators but also (hopefully one day) by tools that provide "intellisense" for example the excellent Softtree's SQL Assistant http://www.softtreetech.com/isql.htm (last time I checked they ...
2
You could also take a look at wsSqlSrvDoc. It's a nice little tool that works with Sql Server extended properties and creates a MS Word document.
The print-out of all column properties (with foreign key relations) works out of the box. For further descriptions on each field you have to set up extended properties of those columns in Sql Server Management ...
2
You can do this with normal DML/DDL.
Create a table with comments:
mysql> create table testcomments (
-> col1 integer comment 'comment on integer column',
-> col2 varchar(20) comment 'comment on varchat col');
Query OK, 0 rows affected (0.01 sec)
Select the information from the data dictionary (documentation link):
mysql> select ...
2
You cannot name a PRIMARY KEY. The name PRIMARY KEY is the designation of the arbitrary, or preferred, unique index (candidate key) for accessing the table. A table can have multiple unique keys, but only one PRIMARY KEY.
EXAMPLE: Employee table with three unique keys
EmployeeID
Driver's License Number
Social Security Number
You can pick a name out of a ...
2
This section of documentation uses the term “User Processes” to refer to the client processes that connect to an Oracle database. If you read down the page further it describes the two types of processes that run the Oracle database server code – Server Processes and Background processes. Like DCookie I have heard Server Processes referred to as User ...
2
This seems to be an elusive bug nobody wants to fix
http://bugs.mysql.com/bug.php?id=24761 (2006-12-01 : Status Triaged)
http://bugs.mysql.com/bug.php?id=41602 (2008-12-18 : Status Closed)
http://serverfault.com/questions/235369/how-can-i-get-mysql-5-5-to-log-warnings-to-one-of-the-log-files (2011-02-14)
According to ...
2
The most common way to do this Excel, but it has it's tradeoffs:
Very difficult to update the spreadsheet if either side of the migration changes (due to missing something, something changing, etc.)
Excel is harder to use by the people implement the rules documented in it.
Change tracking is nearly impossible if you have multiple people collaborating on ...
1
If you're trying to document data mappings then a spreadsheet is probably the simplest approach, although it's not great for anything but a 1:1 mapping. A few approaches are:
Excel: You can use a spreadsheet for the mappings, particularly where they are simple.
If your databases are not isomorphic (i.e. they don't have a 1:1 mapping for all fields you're ...
1
Not sure, but if you wanted to verify that it's still there, you could try this:
SHOW INDEXES FROM a;
This shows "PRIMARY" for the key_name. It must disregard the name and use that instead. Though, for other key types (ex: UNIQUE) it does preserve name. Interesting.
1
I recommend keeping the document very simple and short so it is something that is easy to read, easily understood by people that are not experts in database technology and easy to update.
People have far better things to do than read long test plans, however the test plan should be detailed enough to be followed, its a tough process.
Based on this I ...
Only top voted, non community-wiki answers of a minimum length are eligible
