1.8 Using Data Modeler

SQL Developer Web includes an integrated version of SQL Developer Data Modeler with basic reporting features. You can create diagrams from existing schemas, retrieve data dictionary information, generate DDL statements, and export diagrams.


You can create and edit objects for your schema in the Data Modeler interface.

1.8.1 Navigating Diagrams and Objects

The Diagrams tab lists the Data Modeler diagrams that have been saved. When you right-click a diagram, you have options to open, save, delete, and view properties. When you click a diagram in the list, a thumbnail preview is shown with an option to open the diagram.

  • To create a new diagram, in the Diagrams tab, click the New Diagram icon next to the Search field.

  • To open an existing diagram, in the Diagrams tab, select or right-click the diagram, and then click Open.


Diagrams are stored in the database, in the SQL Developer Web user schema. When you use Data Modeler for the first time, a OSDDMW_DIAGRAMS table is created in your schema, to store the diagrams.

Oracle SQL Developer Data Modeler can import from or export to the OSDDMW_DIAGRAMS table if a connection is provided. For more information, see Sharing Diagrams with SQL Developer Data Modeler.

The Navigator tab lists the objects that are available for each schema. You can select the schema and object type from the drop-down lists. For a particular schema, if a tables object is selected, the left pane displays all the tables that belong to the particular schema. You can expand a table to view its columns. You can drag and drop an object into a selected diagram in the right pane. You can also add objects to the diagram by clicking the Add Objects to Diagram icon in the editor pane.

You can also search the contents of a saved diagram or search for objects in the Navigator tab by name. The search functionality is not case-sensitive, retrieves all matching entries and does not require the use of wildcard characters.

The context menu for a table or view consists of:

Add Object to Diagram: Adds the selected object to the selected diagram.

Add Object with dependencies to Diagram: Adds the selected parent object and other dependent objects that are associated through the foreign key constraints to the selected diagram.

New, Edit, Use as Template: Creates a new object (such as table or view) for a specific schema, edits an existing object, or creates a new object by using an existing one for the initial content. See Creating or Editing a Table and Creating or Editing a View.

Add/Edit Sequence: To create or edit a sequence for a selected schema. See Creating or Editing a Sequence.

Add Index: To create an index for a table. See Creating or Editing an Index.

1.8.2 About the Data Modeling Editor

You can create and work with relational diagrams in the editor pane.

When an object is selected, you can inspect the properties of the object in the right pane. The only properties that you can edit are background and border color. For example, when a table is selected, the properties displayed are Columns, Primary Key, Unique Constraints, Indexes, Foreign Keys, Comments, and Colors. You can edit the background and border color by selecting from the color palette in the Pick a Color dialog box. Click the Reset icon next to the Background and Border Color fields to return to the default colors.

When creating diagrams, you can do the following:

  • Move objects around by dragging the mouse.

  • Adjust or move objects with the relationships intact.

  • Add elbows to relationship lines to avoid intersecting with lines from other objects. Right-click the relationship line and drag to create the elbow. Click the X icon to restore to the original shape.

  • Resize objects by dragging the handles that are positioned around the box.

The Data Modeler toolbar icons are:

  • Save Diagram: Saves the currently selected diagram. Diagrams are stored in a table that are created in the schema of the user.

  • Print Diagram: Prints the selected diagram.

  • Save to SVG: Saves the currently selected diagram to an image file in SVG format.

  • Add Objects to Diagram: A dialog is displayed where you can select one or more objects from a specific schema into the selected diagram. Type * or a few characters in the search field to list the objects from the selected schema.

  • Add Note: Adds notes to the selected diagram. Select the note to see the associated properties in the right pane, such as Text and Colors.

    • To enter text, expand the TEXT box and type information.

    • To select the background, border, or text color for the note, click the box and select the required color. To revert to the default color, click the Reset icon.

  • Delete: Deletes the selected object or objects from the diagram. To select multiple objects, press the CTRL key and select the objects.

  • Zoom In: Displays more detail, and potentially fewer objects, in the currently selected diagram.

  • Zoom Out: Displays less detail, and potentially more objects, in the currently selected diagram.

  • Fit Screen: Makes all relevant objects fit in the window for the currently selected diagram, adjusting the sizes of shapes and text labels as needed.

  • Actual Size: Adjusts the shapes and text labels in the currently selected diagram to the default sizes.

  • Auto Layout): Rearranges the objects in the diagram to a layout that may be more meaningful and attractive. If you do not like the rearrangement, you can restore the previous layout by clicking Undo.

  • DDL Preview: Shows the DDL statements that would be generated to create the object. You can preview the DDL for selected objects by dragging the cursor over the objects that you want to preview and clicking DDL Preview. You have the option to save or send the DDL statements to the worksheet. To specify options on how to generate the DDL, click Options.

  • DDL Preview for Current Schema: Shows the DDL statements that would be generated for the current schema. You can send the DDL statements to the worksheet. To specify DDL options for the schema, click Options.

  • Diagram Report: Generates a report for tables and views in the selected diagram.

  • Schema Report: Generates a report for tables and views in the selected schema.

  • Help: Displays the help for the Data Modeling editor.