Sunday, April 20, 2014

Generating DDL from an ERD in Oracle Data Modeler.


To generate DDL from your ERD in Oracle Data Modeler …
(If you want to practice with an ERD, you can download them from -
http://www.oracle.com/technetwork/developer-tools/datamodeler/sample-models-scripts-224531.html

)

This is a real "bare-bones" look at getting DDL out of Oracle SQL Developer Data Modeler. Not exhaustive by any means and, if I saw a decent tutorial out there, I would just point you to that. But I don't ... so here is a quick run-though.

Open your ERD in Oracle Data Modeler.
Click on the blue arrows (“Generate to Relational Model”)

Click on the “Engineer” button.

Now you should be looking at the Relational Model. To get the DDL, you need to click on the “Generate DDL” button.


 Pick your Database and then click the Generate Button.


Now just click on “OK”


 Click Save and you have your DDL file!



In this case, I have errors! Just look through your file for “Error” and you will find them.




Either fix them in the script or, more properly, fix them in the model and then regenerate the DDL.

Understand that this is the "critical path" ... I would strong encourage you to look around at all the options and try stuff out!

No comments:

Post a Comment