AX1461
Using the data diagram editor
The data diagram editor provides the tools necessary to create or edit a data diagram. When you click New Diagram or Edit Diagram in the Table Manager header, the diagram opens in the editor.
The left-hand side of the editor displays the available tables in a treeview. The right-hand side of the editor is the diagram canvas. To start a new diagram, drag and drop a table from the treeview onto the canvas. Once a table has been placed on the canvas, you can use various features to add new tables and format the diagram.
Data diagram editor
Adding tables to the diagram
You can add tables to the diagram canvas by dragging and dropping tables from the treeview, or by using the Add Tables button.
When using the treeview, you can drag and drop tables one at a time. To find a table, you can:
-
Browse the treeview by table, folder, or table type. Use the View list in the header to change the display of the treeview.
-
Use the Search box in the header. The Search box finds tables based on table name. For example, enter
BGT
into the Search box to find tables with "BGT" somewhere in the table name.
The Add Tables button adds tables that are related to an existing table on the diagram canvas. Select the table for which you want to add related tables, then click the down arrow to the right of the Add Tables button. Select one of the following options:
-
Tables referenced by SelectedTable: Adds tables that the selected table looks up to. This shows you the lookup tables for validated columns in the selected table. This option is available for data tables or reference tables with defined lookups.
-
Tables that reference SelectedTable: Adds tables that look up to the selected table. This shows you which tables use the selected table as the lookup source for a validated column. This option is only available for reference tables, because only reference tables can serve as the lookup column for a validated column.
-
Add all tables related to SelectedTable: Adds tables that the selected table looks up to, and tables that look up to the selected table (as if you selected both of the other options). This option is only available for reference tables, because only reference tables can both be a lookup and have lookups.
Whether you use the treeview or the Add Tables button, the available tables are limited by the tables that you have security permission to see. You must have at least read access to a table in order for the table to be visible in the treeview or added by Add Tables. Therefore users who do not have access to all tables may not be able to create a diagram that encompasses all relationships for a given table. (However, when viewing a saved diagram, users can see any table that was already placed on the diagram.)
For example, imagine that you start a diagram by dragging and dropping the DEPT reference table to the canvas. You can add any additional tables by dragging and dropping them from the treeview, or you can specifically add tables that are related to the DEPT table as follows:
-
If you want to see which tables use DEPT as a lookup table, then you can click Add Tables > Tables that reference DEPT. This will add tables such as GL2018 and Plan2018 to the diagram, assuming these tables have a Dept column that is validated against
DEPT.Dept
. -
If you want to see which tables DEPT looks up to, then you can click Add Tables > Tables referenced by DEPT. This will add tables such as Region to the diagram, assuming the Region column in the DEPT table is validated against
Region.Region
. -
If you want to see all tables with relationships to the DEPT table, then you can click Add Tables > Add all tables related to DEPT. This adds all tables described in the previous two bullets.
To remove a table from the diagram canvas, select the table and then click Remove. You can select and remove multiple tables at a time by using the CTRL key.
Formatting table boxes in the diagram
In the diagram, tables display as boxes with the table name in the top left corner, and the table classification indicated by the icon in the top right corner. You can adjust the size of the table box by selecting the table and then dragging a selection handle until the table box is the desired size.
The inside of each table box details the key columns of the table, as well as any columns that look up to other tables. All other columns in the table are not shown. By default, reference tables and document reference tables are sized to show the single key column only, and data tables are sized to show two key columns. You can resize the table box to be taller if you want to show all included columns in the diagram. If the table box is too small to see all of the included columns, you can use the scroll bar to scroll the column list (note that this is difficult to do in the editor because it selects the table as if you want to move it, but it works when viewing a saved diagram as read-only).
The color of the box indicates the table classification. The color cannot be changed.
- Blue: Data table
- Green: Reference table
- Orange: Document reference table
Formatting relationship lines between tables
Whenever a table is placed on the diagram canvas, relationship lines are automatically drawn between that table and any other table on the canvas that the table has a relationship with. The line flows from the validated table to the lookup table, with an arrowhead pointing to the lookup table.
You can hover your cursor over the line to see the names of the two columns that make up the connection.
Relationship lines are automatically anchored on both table boxes:
-
The anchor points are automatically determined based on the relative positions of the connected boxes; so as you move a table, the anchor points may change. By default, lines are anchored in the center of the side that the line is connected to.
-
If a table has multiple relationship arrows anchoring to the same side of the table box, then the anchor points are equally distributed along the side.
-
It is not possible to manually adjust anchor points, but you can adjust the positioning of the affected tables to see if there is an automatic configuration that you prefer.
Relationship lines can be straight or cascading. Cascading lines have right angles (the previous example shows a cascading line).
To change the line style for the diagram:
- Click the down arrow to the right of the Line Styles button.
- Select Cascading or Straight. Only one option is available at a time; the currently applied style is grayed out.
The line style applies to all lines in the diagram. It is not possible to mix line styles in the same diagram.
NOTE: Document reference tables cannot link to other tables and therefore will never have relationship lines on a diagram. However, you can still add these tables to diagrams because they may be functionally related to other tables even though they are not technically related. For example, you may want to create a diagram that shows all tables used by file group Budget 2019, which would include one or more document reference tables (driver tables).
Positioning tables on the diagram
The diagram editor has various features to assist you in positioning tables on the diagram canvas:
-
Moving tables: To move a table, select the table and then drag and drop it to the desired location on the diagram canvas. You can also select multiple tables (using CTRL or Shift) and then move those tables as a group.
-
Aligning tables: To align multiple tables, first select the table that you want to use as the "anchor" for the alignment. Then, use the CTRL or Shift key to select one or more additional tables that you want to align with the first table. Once all tables are selected, click the down arrow to the right of the Align button, and then choose the alignment point: Left, Right, Top, Bottom, Center Horizontally, or Center Vertically.
For example, if you click Align Tables > Left, then all selected tables will be aligned with the left side of the "anchor" table.
-
Automatic layout: Click Auto Layout to automatically distribute tables on the canvas, using an internal algorithm. Once the auto-layout has been applied once, continuing to click the button will make small adjustments to the layout. If a table is added, removed, or moved, clicking the button will re-distribute the layout based on the current number of tables and relative positions of each.
If you make a layout change and then decide that you do not like it, you can use the Undo button to restore the diagram to its prior state.
You can zoom the canvas and pan the diagram contents on the canvas, but these changes are not saved in the diagram. When a saved diagram is opened, it starts at the default zoom and pan position. For more information, see Viewing data diagrams.