Home > Data Modeler Tutorial: Mode... > Generate DDL
Generate Data Definition Language (DDL) statements that you can use to create database objects that reflect the models that you have designed. The DDL statements will implement the physical model (type of database, such as Oracle Database 11g) that you specify.
Develop the physical model as follows:
Optionally, view the physical model before you generate DDL statements:
With the relational model selected, click Physical, then Open Physical Model. A dialog box is displayed for selecting the type of database for which to create the physical model.
Specify the type of database (for example, Oracle Database 11g), and click OK. In the hierarchy display on the left side of the window, a Physical Models node is added under the Library relational model node, and a physical model reflecting the type of database is created under the Physical Models node.
Expand the Physical Models node under the Library relational model, and expand the newly created physical model and the Tables node under it, to view the table objects that were created.
Click File, then Export, then DDL File.
Select the database type (for example, Oracle Database 11g) and click Generate. The DDL Generation Options dialog box is displayed.
Accept all defaults, and click OK. A DDL file editor is displayed, with SQL statements to create the tables and add constraints. (Although you can edit statements in this window, do not edit any statements for this tutorial exercise.)
Click Save to save the statements to a .sql script file (for example, create_library_objects.sql
) on your local system.
Later, run the script (for example, using a database connection and SQL Worksheet in SQL Developer) to create the objects in the desired database.
Click Close to close the DDL file editor.
Go to Save the Design.
Related Topics