I want to use Oracle SQL Developer to generate an ER diagram for my DB tables but I am new to Oracle and this tool.
What is the process for creating an ER diagram in SQL Developer?
I want to use Oracle SQL Developer to generate an ER diagram for my DB tables but I am new to Oracle and this tool.
What is the process for creating an ER diagram in SQL Developer?
Create a diagram for existing database schema or its subset as follows:
The ERD is displayed.
Export the diagram as follows:
The diagram is exported. To export in a vector format, use To PDF File, instead. This allows for simplified editing using Inkscape (or other vector image editor).
These instructions may work for SQL Developer 3.2.09.23 to 4.1.3.20.
Since SQL Developer 3, it's pretty straightforward (they could've made it easier).
Untitled_1
), right-click «Relational Models» and select «New Relational Model».Relational_1
) and select «Show».Relational_1
tab (or whatever name) is the active one in the rhs before you drag them over, because it has probably switched to one of the tables you clicked in the lhs.SQLDeveloper > Tools > Preferences > Database > Object Viewer > Open Object on Single Click
.
The process of generating Entity-Relationship diagram in Oracle SQL Developer has been described in Oracle Magazine by Jeff Smith (link).
Excerpt:
Entity relationship diagram
Getting Started
To work through the example, you need an Oracle Database instance with the sample HR schema that’s available in the default database installation. You also need version 4.0 of Oracle SQL Developer, in which you access Oracle SQL Developer Data Modeler through the Data Modeler submenu [...] Alternatively, you can use the standalone Oracle SQL Developer Data Modeler. The modeling functionality is identical in the two implementations, and both are available as free downloads from Oracle Technology Network.
In Oracle SQL Developer, select View -> Data Modeler –> Browser. In the Browser panel, select the Relational Models node, right-click, and select New Relational Model to open a blank model diagram panel. You’re now starting at the same place as someone who’s using the standalone Oracle SQL Developer Data Modeler. Importing Your Data Dictionary
Importing Your Data Dictionary
A design in Oracle SQL Developer Data Modeler consists of one logical model and one or more relational and physical models. To begin the process of creating your design, you must import the schema information from your existing database. Select File -> Data Modeler -> Import -> Data Dictionary to open the Data Dictionary Import wizard.
Click Add to open the New -> Select Database Connection dialog box, and connect as the HR user. (For detailed information on creating a connection from Oracle SQL Developer, see “Making Database Connections,” in the May/June 2008 issue of Oracle Magazine.)
Select your connection, and click Next. You see a list of schemas from which you can import. Type HR in the Filter box to narrow the selection list. Select the checkbox next to HR, and click Next.
Article link:
For a class diagram using Oracle database, use the following steps:
File → Data Modeler → Import → Data Dictionary → select DB connection → Next → select database->select tabels -> Finish
There is a companion tool called Oracle Data Modeler that you could take a look at. There are online demos available at the site that will get you started. It used to be an added cost item, but I noticed that once again it's free.
From the Data Modeler overview page:
SQL Developer Data Modeler is a free data modeling and design tool, proving a full spectrum of data and database modeling tools and utilities, including modeling for Entity Relationship Diagrams (ERD), Relational (database design), Data Type and Multi-dimensional modeling, with forward and reverse engineering and DDL code generation. The Data Modeler imports from and exports to a variety of sources and targets, provides a variety of formatting options and validates the models through a predefined set of design rules.
For a Entity Relationship Diagram using Oracle SQL Developer:
File → Data Modeler → Import → Data Dictionary → Select database connection → Next → Select schema/database (Check All Selected) → Next → Select object to import(if All Selected was not checked) → Next → Finish
Oracle used to have a component in SQL Developer called Data Modeler
. It no longer exists in the product since at least 3.2.20.10.
It's now a separate download that you can find here:
http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
I'm running SQL Developer 17.2.0.188 build 188.1159 which does indeed contain data modeling capability. I just created a relational model diagram via the menu: File->Data Modeler->Import->Data Dictionary....
I also have the stand-alone Data Modeler, which does the same thing.
As the Data Modeler tutorial states:
Figure 4: Relational model and diagram for HR
The diagram you’ve generated is not an ERD. Logical models are higher abstractions. An ERD represents entities and their attributes and relations, whereas a relational or physical model represents tables, columns, and foreign keys."
Its easy go to File - Data Modeler - Import - Data Dictionary - DB connection - OK