Model perspective displays tables and their relationships in an entity relationship diagram. You can switch to the perspective using the toolbar button or “Window” menu.
Double-click any table node in the “Database Explorer” to add the table to the diagram. Or, simply drag the table and drop it at a proper position in the diagram. You can also right-click on a table node in the “Database Explorer”, and choose “Add Related Tables to Diagram” menu option to add the table and all its related tables to the diagram.
The tables are displayed with their column definitions. The required (not null) columns are shown in bold. The primary key columns are marked with key icons. The foreign key relationships and user defined master-detail relationships are displayed as connections among tables. The connections start from the primary key (master table) columns and point to the foreign key (detail table) columns.
You can click a table in the diagram, and drag it to a proper position. Or, click a table to highlight it, and press the “Delete” key to remove it from the diagram.
After you are satisfied with the layout, you can invoke the “File” menu to save the diagram or print it out. You can also create a new diagram by selecting the “New Diagram” menu option, or open a saved diagram using the “Open Diagram…” menu option.
The model view has a second toolbar to help layout the diagram and customize its fonts and colors. The outline view shows a thumbnail image of the diagram to help visualize large diagrams. The options menu allows users to add tables, notes and texts to the diagram and create or modify table relationships. We will describe these features in detail in following sections.
Model view has a second toolbar under the main toolbar to help layout the diagram objects and customize their fonts and colors.
The “Font family”, “Font size”, “Bold”, “Italic”, “Font Color”, “Fill Color” and “Line Color” options can change the corresponding font and color properties of diagram objects. You can select one or any number of diagram objects and change their fonts and colors.
The “Copy appearance” option allows users to copy the font and color properties from the first selected objects to the other selected objects.
The “Select” drop down menu allows users to select all objects, all shapes, or all connectors (i.e. the table relationships).
Assume that you right-click on the “Asset” table and choose “Add Related Tables to Diagram” menu option, the following three tables will be added to the diagram:
Click the “Arrange all” button will layout the diagram properly:
The “Align” drop down menu allows users to align a group of selected objects to their left, center, right, top, middle or bottom.
The “Auto size” button can adjust an object size properly after you make any changes that affect the object’s size, such as changing its font family, font size or font style.
The “Zoom” combo box allows users to specify a zoom percentage of the diagram. The “Zoom in” and “Zoom out” buttons allow users to zoom in or zoom out the diagram.
The “Outline view” has two pages – the thumbnail page and the content list page. You can switch between these pages using the toolbar buttons at the top-right corner of the outline view.
The thumbnail page shows a thumbnail image of the diagram. It is very helpful to visualize a multi-page diagram when the page breaks is turned on.
The following shows a diagram with 4 pages, and the view port is at the top-left corner of the diagram. You can drag the view port in the thumbnail view to move the corresponding area of the main diagram into focus.
The content list page shows tables, notes and texts in the diagram. You can click any of these objects to move the corresponding object in the main diagram into focus. The content list page supports quick search, you can just type the first few characters of a table name to locate the table in the list.
The options menu allows users to add tables, notes and texts to the diagram, and create or modify table relationships. It has a “View” sub-menu to let users to turn on rulers, grid and page breaks, and a “Show View” sub-menu to display the outline view and the properties view.
Choose the “Add Tables…” menu option will display the “Add Tables” dialog box.
Select a database in this page, then, click the “Next” button.
Choose tables, views and synonyms in the "Available database objects" list box and move them to the "Selected database objects" list box. Then, click the "Finish" button to add them to the diagram. These database objects will be stacked together at the top-left corner of the diagram. You can click the “Arrange All” toolbar button to layout them properly.
You can also add notes and texts using the options menu. After choose the “Add Note” or “Add Text” option, a note or text object will be added at the top-left corner of the diagram. You can drag them to a proper place, and double-click the note or text object to start editing them.
The “New Table Relationship…” and “Edit Table Relationship…” menu options invoke the wizard dialog box described in Section "Define master-detail relationships" to create or edit master detail relationships between tables. The difference here is that the wizard will only allow users to choose master and detail tables that are displayed in the diagram.
Note that the foreign key relationships are not editable. Therefore, if you click a foreign key connection, and select “Edit Table Relationship…” menu option, the wizard will only display read-only pages that allow you to see all the related key columns.
You can use the “View” sub-menu in the options menu to turn on rulers and grid. Rulers and grid can help align objects in the diagram.
You can click on the vertical or horizontal ruler to create a guide. Drag an object to the guide to attach the object to it. Then, you can drag the guide to move all its attached objects.
After the grid is turned on, the object movement will be restricted to the grid units. This makes it easier to align objects along the grid lines.
Page breaks displays the page boundaries in a multi-page diagram. You can turn on or turn off the page breaks using the “View | Page Breaks” sub-menu in the options menu.
The following shows a diagram with 4 pages when the page breaks is turned on.
The positions of the page breaks are calculated based on the page size, page margins, and page orientations. You can specify these parameters in the “Page Setup” dialog box invoked from “File | Page Setup…” menu.
Before printing out the diagram, you can invoke the Print Preview dialog box from “File | Print Preview” menu to see how the diagram will look like based on the current setting. The Print Preview dialog has a drop down menu to show 1 page, 2 pages or 4 pages in the preview window. Users can use the “Left”, “Right”, “Up” and “Down” toolbar buttons to navigate to other pages.
The “Properties view” shows different property sections for different diagram objects. The “Appearance” section allows users to change font and color properties of diagram objects. The “Rulers & Grid” section allows users to set additional properties of the rulers and grid, such as ruler units, grid spacing, grid line color and grid line style. You can display the “Properties view” from the “Show View | Properties” sub-menu of the options menu.
You can use “File | Save” menu to invoke the “Save Diagram As” dialog box. The dialog box allows users to either save the diagram in the internal file format, or export the diagram to a GIF, JPG, SVG or PNG format image file.
The diagram file saved in the internal format holds the table and relationship definitions and also has a reference to the databases defined in the SQL Edge environment. When the diagram is opened, it will be automatically refreshed with the up-to-date table and relationship definitions.
You can also send the diagram file to a colleague. Even if his copy of SQL Edge does not have the same database definitions, he can still open the diagram but in a restricted mode. Except not be able to add or modify relationships among the tables in the diagram, he can still modify other aspects of the diagram and print or save the modified diagram.
Copyright © 2004-2012 Bay Breeze Software, Inc.