Creating an E/R Diagram

WinSQL Professional allows you to create an E/R Diagram based on an existing database. You can selectively pick the tables that are logically grouped with each other or pick all tables in the entire database to draw the diagram.

Click Add Diagram under the E/R Diagram node in the Catalog Tree. The following window will prompt you to enter a friendly name for the E/R diagram. This friendly name is used to identify E/R diagrams for this connection. There is no limit to the number of diagrams.

On the following window you may add tables for this diagram by double-clicking the table name. The window depicted shows the E/R diagram after all desired tables are added.

The following table describes the actions available in the Entity/Relationship diagram window:

 

Icon

Description

Add New Relation – Click to create a Master-Detail relationship between two tables. After you click this icon, the cursor changes to a hand. You MUST select the master table first and then the detail table

Zoom In – Click to enlarge the size of the image on the screen, as well as the printed output.

Zoom Out – Click to reduce the size of the image on the screen, as well as the printed output.

Copy to Clipboard – Copies an image of the diagram to the clipboard allowing you to paste it in any other program

Add Tables – Use this button to add more tables to the diagram

Options – This button allow changing diagram options. You can display/hide fields and display their data types.

Saving the Diagram

WinSQL automatically saves diagrams. Simply select the desired diagram from the Catalog Tree to display the image at a later time.

Adding local relationships

WinSQL will add a local relationship when you click Add Relationship. As the name implies, a local relationship is local to WinSQL and does not change any design in the back-end database. Local relationships are indicated by a red connector in WinSQL.