There are four methods of creating a table entity in the ER Modeler.

1. Right-clicking within a sheet and choosing New Table from the menu. This puts a new table where the click occurs. The Table Properties window appears to enter the table information. The table columns and properties vary based on the database vendor and version selected when the ER model document was created.

2. Right-clicking on the Tables node within the Model Browser and choosing New Table. This puts a new table centered within the current view of a sheet.

3. Left-clicking in the Palette on the Table Entity icon and then left-clicking with the Table Entity icon within a sheet. This puts a new table where the click occurs.

4. Within the Menu Bar, select Edit > New Table. This puts a new table centered within the current view of a sheet.

It is also possible to import a table from an existing database. Information on how to import schema objects into a model is available under the Reverse Engineering section.

Table Properties

Once a table has been created within a sheet, it may be double-clicked or right-clicked to alter its properties. Its properties may also be viewed and altered by right-clicking on its node in the Model Browser. There are four tabs available on the table properties windows. Within the General Tab, when a column is selected, it is possible to add Column Comments under the Column Parameters Tab at the bottom of the Table Properties dialog, or by right-clicking in the list of columns and selecting Insert Column.

To reorder how the columns display in this list, right-click on the row representing the column and choose to Move Up or Move Down. There are also buttons on the right side of the Columns list which Move Up or Move Down the currently selected row representing the column.  This allows changing how the table columns are listed in Table Entities in an ER Model.

Columns within the Table Properties can also be duplicated, to make adding columns much faster. Right-click on a column and select Duplicate to copy all of its properties. A duplicated column keeps the name of its source and is appended with <copy> to indicate it is a duplicate.

General tab

The General tab allows selection of Database, Schema, Table Name, Column editing, and creation, Column Data Type, Column Length and Allow Nulls. The datatypes available to columns vary based on database vendor and version selected for the current ER Model. New columns can be entered by editing the column list and their data types and values are editable.  Table column parameters are displayed in the pane at the bottom of the table properties window, and can also be edited. Once a database name has been typed in any table properties dialog for an ER Model, that database becomes available in the drop-down list of any table in the model to save time when modifying existing tables or creating new ones. The list of databases grows as more are referenced. The same is true of the Schemas drop-down menu.

Storage tab

Displays Table Storage information for the current table. The information displayed here varies based on database vendor and version, allowing modifications for database administration optimization.

Comments tab

The Comments Tab displays any user-entered comments for that table. When DDL is generated, these comments are set to the comment formatting selected under File > Options > Scripts > (database vendor). For more on server-side and client-side comments, see the Comments section

Appearance tab

The color of Table and View Entities can be set on a per-entity basis by changing it within the Property Appearance tab.

SQL Preview tab

The SQL Preview displays the DDL that would be created if the table were to be generated as a script from the ER Model.

Completed ER Model Table Properties Example

The screenshot marked "completed model" shows a completed table named "customers3" that exists in a Microsoft SQL Server 2000 "Northwind" database. Notice the table "Customers3" is highlighted in the Node Browser on the left to indicate which table is being edited.

Sheet - right-click - new table

Node browser - right-click - new table

Entity palette - left-click - sheet - new table

Menu bar - edit - new table

Table properties - sheet - double-click

Table properties - node browser - right-click

Table properties - completed model

  • No labels