Schema - Do you know how to provide best database schema document?
Last updated by Tiago Araújo [SSW] 3 months ago.See historyYou should not provide a database schema via several screen captures - it has little information about the details. A well-formatted Word document may be providing more details information, but it is not easy to maintain the document to keep it up-to-date. The best way is to automatically generate your document with a tool.
We recommend and use Red-Gate SQL Doc to produce chm help files or html pages of the database schema. SQL Doc also allows you to run via the command line so you can include the generation in your build process to be automatically created.
We have also have used other available tools in the past, such as Apex SQL Doc.
Alternatively, you can use SQL Management Studio to generate a Database diagram.
- Connect to your database using SQL Server Management Studio
- Create a new Database Diagram, by right-clicking Database Diagrams
- A popup will appear. Shift-Click to select all the tables then click Add
- You will see tables populate behind the dialogue box, once complete click Close
- Click off the tables in the diagram and Ctrl+A to Select all
-
Right-Click one of the tables in the diagram and perform the following
a. Select Table View | Standard from the menu b. Select Autosize Selected Tables from the menu
- Right-click the diagram background and select Show Relationship Labels
- Move the tables around so that the Relationship Labels are clearly visible
Note: You will need to screenshot the diagram as using the copy to clipboard function removes the “Allow Nulls” checkmarks.