Saturday, June 2, 2012

Reverse Engineering Oracle Database Schema to ER Diagram

In this post, I'll show how to use Oracle SQL Developer to reverse engineer a schema into a relational diagram. You will need SQL Developer v3.x for this.


1) Go to File >> Import >> Data Dictionary




2) This will open up the Import Wizard. Click on Add to connect to the Database which contains the schema you wish to reverse engineer.


3) Once you have successfully tested connection click OK.


4) Select the newly created connection and click on Next


5) You will be prompted for password again, enter and click OK


6) Now we select the schema. In my case I selected a schema called Tutorial that comes bundled with Oracle APEX.



7) Next we select the tables. You may select all tables or a handful to see the relationships between them. Here I wanted to see the relationship between the tables prefixed by OEHR (again comes with APEX).


8) Next you will get a view summary. Verify and click Finish



9) You will be asked for your logins for 3rd time in this process. Enter and click OK.


10) Review the log and close to view your ER diagram.









11) To print your ER diagram to image/PDF. Go to Data Modeler >> Print Diagram >> To Image File.


2 comments: