Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Documenting Database Schema.

Status
Not open for further replies.

mukund

Programmer
Mar 6, 2001
64
GB
Hi,
Has anybody written a script that can help me document my table's structure.

Say in the following format

TableName : RadioStation

FieldName PK/FK DataType
-----------------------------------------------------
RadioStationId PK int
CountryId FK (Country) smallint
LangId FK (Language) smallint
AddrId FK (Address) int
RadioStationname varchar(100)



For a foreign key the PK table is depicted in brackets.

If anybody has already done something like this, it can help a lot towards documentation of the Database Schema.

Any help/suggetions is welcome.

Mukund.
 
What you could do is script your database. Right click on the database in EM and select all tasks, Generate SQL Script. You could then refomat as needed. Ashley L Rickards
SQL DBA
 
If you have Microsoft Visio, you can create a schema by importing the database structure. It'll even look pretty when you are done :)
 
If you're using SQL 7 or above, you can get it to automatically build a database diagram. Open up the database in Enterprise Manager, select diagrams, right click select new diagram, it's all fairly intuitive.
 
Look at the INFORMATION_SCHEMA views in SQL Server, which document the database automatically.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top