Articles
SQL & PL/SQL
By Casimir Saternos
Learn how to install/configure Oracle SQL Developer Data Modeler and then perform some common tasks.
Published July 2009
Oracle SQL Developer has quickly become a popular graphical tool for database development. New features have been added in each release, demonstrating Oracle's commitment to continuing to enhance this product. With Oracle SQL Developer, you can browse database objects, run SQL statements and scripts, and write and run PL/SQL programs. You can also run supplied database reports and even create and save your own queries as reports.
However, one feature not included is the ability to create database diagrams. In particular, entity relationship diagrams (ERDs) are a popular way to represent the design of a set of database tables and their relationships in a compact, expressive manner. Oracle recognizes this need and has introduced Oracle SQL Developer Data Modeler to provide a variety of data and database modeling tools and utilities.
Oracle SQL Developer Data Modeler has many features related to designing and implementing databases. It is based on standards including the Zachman Framework, as well as the Object Management Group's MetaObject Facility (MOF) and Common Warehouse Metamodel (CMW) specifications. As such, it streamlines the development process to promote robust, complete, and well-designed databases. Its many capabilities include code generation, import and export to a variety of destinations, formatting functionality, and rule-based validation of models.
This article will show you how to install and configure Oracle SQL Developer, generate an ERD based upon the supplied HR demonstration schema, and export a SQL Data Definition Language (DDL) creation script for the schema.
Oracle SQL Developer Data Modeler is platform independent and is compatible with Oracle Database version 9.2.0.1 and later. Currently it is available as a standalone product, but there are plans in the works to make it available as an extension to Oracle SQL Developer. The demonstration provided in this article runs on a Windows OS machine and uses the freely available Oracle Database Express EditionIf you have not done so already, do the following:
If you have not already done so, unlock the HR user's account.
Regardless of the installation option you chose, you can start Oracle SQL Developer Data Modeler by double-clicking datamodeler.exe. There is a corresponding bash shell script supplied named datamodeler.sh for Linux users. The main application window will open, providing an interface similar to that used with Oracle SQL Developer. A browser with tree navigation appears on the left, various panels appear on the right, and menus and buttons are available at the top of the screen.




You can then choose Test Connection, and you should see a confirmation of the test as follows:




Tab | Option |
Tables | Select All |
Views | Select EMP_DETAILS_VIEW |
Users | Select HR |
Sequences | Select All |
Stored Procedures | Select All |

Click Finish and wait a few minutes while files are generated. When the process is complete, a log file will be displayed with the results. Click Close to close the View Log window. The diagram will be displayed in a pane on the right side of the application window.
There are a number of options you can choose for modifying the appearance of the diagram. All of the details of the tables (table name, column names, data types, and keys) are displayed initially. By right-clicking on the diagram and choosing View Details, you can limit what information is displayed. Buttons at the top of the screen allow you to zoom in and out and fit the diagram to the screen. By right-clicking on an object on the diagram and choosing Format, you can further refine the appearance of objects in the diagram (changing color, font, sizing, and so on).

With a diagram of our database before us, we can modify the diagram in a number of ways. The following actions are available to add more objects and modify the objects already displayed.
Button | Action | Description |
| Select | Used to select existing objects. Once an object is selected, it can be moved or resized. You can also right-click for additional options. |
![]() | New Table | Used to create a new database table. |
![]() | New View | Used to create a new database view. |
![]() | Split Tables | Used to split a table into two separate tables. |
![]() | Merge Tables | Used to merge to separate tables into a single table. |
![]() | New FK Relation | Used to create foreign key relationships between tables. |
![]() | New Type Substitution | Used to graphically describe situations where subtypes are compatible with the entity (table). It is essentially a subclassing or inheritance mechanism. This functionality can be enforced using triggers in the database. |
Once you have made modifications to a model, you are able to export the results as SQL DDL. Choose File -> Export -> DDL file (or press Shift+E)to initiate the export. This will bring up the DDL File Editor. Click the Generate button to proceed to the available generation options.


Oracle SQL Developer Data Modeler provides the data architect with the ability to effectively manage, analyze, and implement data models in a well organized and integrated manner. It includes extensive documentation and a tutorial to get you up-and-running quickly. It is an excellent addition to Oracle's software suite, providing powerful tools for data management and architecture tasks.
Casimir Saternos is an Oracle Certified DBA, IBM Certified Enterprise Developer, and Sun Certified Java Programmer based in Allentown, Pennsylvania.