Chat now with support
Chat with Support

Toad Data Modeler 7.3 - User Guide

Introduction User Interface Models and Model Objects
Physical Data Model
Entity Relationship Diagram Objects Basic Database Design Advanced Database Design
Universal Data Model Logical Data Model Working with Model Objects
Features and Tools
Application Variables Export/Import DDL Script Generation Graphics Model Actions Print Create New Project Reports Reverse Engineering Scripting and Customization About Templates Tips and Tricks Toad for Oracle Integration Toad Intelligence Central (TIC) Integration Tools Version Control
Options and Configuration Databases
Amazon Redshift 1.0 IBM DB2 LUW 9.5 IBM DB2 LUW 9.7 IBM DB2 LUW 10.1 IBM DB2 LUW 10.5 IBM DB2 LUW 11.1 IBM DB2 z/OS 10 IBM DB2 z/OS 11 Greenplum 4.1 Greenplum 4.2 Ingres 9.3 Ingres 10.0 EDB Postgres Advanced Server 10 Microsoft Access 2007/2010 Microsoft Azure SQL Database V12 Microsoft SQL Server 2005 Microsoft SQL Server 2008 Microsoft SQL Server 2012 Microsoft SQL Server 2014 Microsoft SQL Server 2016 Microsoft SQL Server 2017 Microsoft SQL Server 2019 MySQL 5.0 MySQL 5.1 MySQL 5.5 MySQL 5.6 MySQL 5.7 MySQL 8.0 Oracle 10g Oracle 11g Release 1 Oracle 11g Release 2 Oracle 12c Release 1 Oracle 12c Release 2 Oracle 18c Oracle 19c PostgreSQL 9.0 PostgreSQL 9.1 PostgreSQL 9.2 PostgreSQL 9.3 PostgreSQL 9.4 PostgreSQL 9.5 PostgreSQL 10 PostgreSQL 11 PostgreSQL 12 SQLite 3.7 Sybase ASE 15.5 Sybase ASE 15.7 SAP ASE 16.0 Sybase IQ 15.2 Sybase SQL Anywhere 11 SAP SQL Anywhere 17 Teradata 13 Vertica Database 8.0
Copyright Legal Notices

Import from ER/Studio Data Architect

  • Toad Data Modeler is able to import physical models for Oracle versions 9, 10, 11, and 12
  • ER/Studio Data Architect 11 needs to be installed in order to import physical models into Toad Data Modeler
  • Select File | Import | ER/Studio Data Architect to import models

DDL Script Generation

Script Generation Preparation

Before generating a DDL script, you might want to configure the following things:

Order of Generated Objects

Toad Data Modeler allows you to set the order of objects before SQL/DDL script generation.

Example: You want to generate Users before User Permissions to a table.

You can change order of the following objects:

  • Domains
  • Entities
  • Views
  • Dictionary types
  • Sequences
  • Stored procedures
  • Functions
  • Users
  • User data types

To set an order of objects for SQL/DDL script generation

  1. Go to Model Menu | Order of Generated Objects.
  2. Select an object, or an object type.
  1. Use to move your selection up/down by one step or use drag&drop to place your selection wherever you want.

Note: To display full names of objects, click on

  1. Switch to Extension tab for more options. Press F2 or left-click and hold any of the values to set it as desired.

You can configure when should be the listed object types generated.

To sort objects automatically according to their relationships

  1. Select Model | Order of Generated Objects to set the desired order of entities
    1. Select Move Parent Entity before Child Entity - lists each parent entity before their respective child entities or
    2. Select Move Child Entity after Parent Entity - lists all child entities after their parent entities

Note: When you set After CREATE TABLE Section value for an object, the object will not be shown in Entity SQL Preview.

Order of Generated Objects dialog is also accessible from DDL Script Generation dialog | Detail Settings tab| Edit.

Script Encoding

To set encoding for generated scripts

  1. Go to Settings Menu | Options | Model | Physical Model | SQL Generation Script tab | SQL Script section.
  2. Choose the preferred encoding from Encoding Used for SQL Scripts box.

How to Generate DDL Script

This topic describes full configuration of a DDL script generation. In most cases, you will not need to configure all of the available settings.

Note: An Oracle 10g model is used in this topic. The dialogs and options available may vary depending on your model database platform and version.

Start by opening DDL Script Generation dialog using any of these methods:

  • Click the button on Model Toolbar
  • Go to Model Menu | Generate DDL Script | Run
  • Use shortcut - F9

Selecting Items for Generation

This essential part of script generation, you need to select items which should be generated.

Option Description
Location of SQL File Select the location where the generated script will be saved. You can also select an already existing script and check Append to File checkbox to append the generated code to the original file.
User/Schema Choose a user/schema from this box to only generate all of its assigned items.
Selection You can save/load your custom selections. To do that, simply select the objects you want to be generated from the Objects Grid and then click button to save your selection. If you will generate scripts in the future, you can load your selection or even make it default .
Bulk Selection

This section contains several buttons that help you select multiple objects quickly. You can:

  • Select All
  • Deselect All
  • Invert Selection
  • Auto Check (if enabled, automatically checks sub-items when the parent item is checked)

There is also a combobox which can be used to assign Extended Value to all items in Objects Grid at once.

Objects Grid In this grid you select objects you want to generate by checking them in the Property Name column. And in the Extended Value column you can choose the SQL statement which should be used for the specific item in the final script (e.g. create, replace, drop).

Detailed Settings

Specific and database related settings can be found on this tab. Usually it is not necessary to change them in any way.

Referential Integrity

The main selection of objects for generation takes place in Select List. Referential integrity further specifies which relations are generated. It has the following options:

  • Always - relationships are always generated if they are included in Select List
  • If Child Table is Generated - relationship is generated only when its child table is included in Select List
  • If Parent Table is Generated - relationship is generated only when its parent table is included in Select List
  • If Child or Parent Table is Generated - relationship is generated only when child, parent or both are included in Select List
  • If Child and Parent Tables are Generated - relationship is generated only when both child and parent tables are included in Select List

Select List

If you want to generate only a set of specific model objects, you can do exactly that on Select List tab. By default, all objects that have Generate checkbox checked (e.g. Entity Properties) will be generated (unless you edited some other setting). If you uncheck the Generate by Property "Generate", you are able to select any objects you want.

Note: This tab is linked to the What to Generate tab | Objects Grid. If you uncheck an object type there, it you won't be able to select any of its objects in Select List tab.

Script Preview

You can preview the generated SQL script at any time. To do that, check the Show Preview checkbox on What to Generate tab. Then click the Generate button. Toad Data Modeler will offer you a preview of the script before you decide to save it. If you wouldn't have checked the Show Preview checkbox, the script would be saved first before you could preview it.

Note: Models are automatically verified before generating DDL script. To learn more, see Model Verification.

TIP: If you plan to do this action again in the future, you might want to click the Save Action button to save this Action Definition. See Model Actions for more information.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating