By default, tables on the diagram are displayed as shapes. Each table shape includes a caption with the table icon, name, and a button to minimize the table. Below the caption, the table lists its columns, followed by collapsed sections for constraints, indexes, and triggers (if any exist).
To edit a database object:
1. Double-click the required object on the diagram.
2. In Object Editor, make the changes.
3. To save the changes, select Apply Changes at the bottom of Object Editor.
To discard all changes to the database object on any tab of the editor (but not the changes to the table or view data on the data view), select Refresh Object at the bottom of Object Editor.
To display the script changes, select Script Changes at the bottom of Object Editor.
To edit a table on a diagram, double-click the required table to open Table Editor.
Alternatively, right-click the table and select Open Editor. For instructions on editing the table in the Table Editor, see Work with Table Editor.
You can create table columns, indexes, and constraints in the diagram shape.
To create a column, right-click an existing one and select New Column.
To create an index:
1. Right-click the Indexes line and select the corresponding item from the shortcut menu.
2. If the corresponding compartment is unavailable, right-click the table caption and select New Check Constraint.
To create a constraint:
1. Right-click the Constraints line and select the corresponding item from the shortcut menu.
2. If the corresponding compartment is unavailable, right-click the table caption and select the corresponding item from the New Index sub-menu of the shortcut menu.
Note
You can create, edit, and delete triggers the same way: Right-click the table caption and select New Trigger.
Note
The Constraints, Indexes, and Triggers sections are not displayed in the following cases:
- The table does not contain any constraints, indexes, or triggers.
- These sections are not available in the diagram options.
You can edit table columns, indexes, and constraints in the diagram shape.
To edit the required table object:
1. Double-click the object.
2. In Table Editor, update the element.
3. Select Apply Changes to save the changes.
To delete a shape from a diagram but keep the database object in the database, right-click the object and select Remove from Diagram. Alternatively, select the object and press the Delete keyboard shortcut.
To remove a database object from the database, right-click the object and select Drop from Database. Alternatively, select the object and press the Ctrl+Delete keyboard shortcuts.
You can drop table columns, indexes, constraints, triggers, relations (foreign keys) only from a database using the Delete and Ctrl+Delete keyboard shortcuts. However, you cannot delete view columns and stored routine parameters.
To adjust database object shapes, right-click the database object, select Shapes, and then select one of the following options:
To find a database object in Database Explorer, right-click the object and select Find in Database Explorer. The object is highlighted in Database Explorer.
To display a database object in Document Outline, right-click it and select Synchronize with Document Outline.