Manage database objects on a diagram

Last modified: June 2, 2025

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).

Edit database objects on a diagram

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.

Edit a table on a diagram

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.

Create table elements

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.

Create a 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.

Edit table elements

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.

Delete database objects from a diagram

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.

Adjust database object shapes

To adjust database object shapes, right-click the database object, select Shapes, and then select one of the following options:

  • Collapse to collapse a database object. Only the database object caption is visible. Alternatively, double-click the database object caption or select the collapsible arrow in the upper right corner of the database object.
  • Expand to display a collapsed database object on the diagram.
  • Collapse Compartments to hide the compartments of a database object, such as columns, constraints, indexes, and triggers.
  • Expand Compartments to display all the collapsed compartments.
  • Bring to Front to move the database object above other overlapping objects.
  • Send to Back to move the database object behind other overlapping objects.
  • Align to Grid to align objects to the grid for a structured layout.
  • Best Fit to automatically adjust the zoom level to ensure that all objects fit within the database object.

Find in Database Explorer

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.

Synchronize with Document Outline

To display a database object in Document Outline, right-click it and select Synchronize with Document Outline.