Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Data Tools Platform Guide
Previous Page Home Next Page


Generating DDL

Generate data definition language (DDL) for a database, database objects, or both.

Data definition language (DDL) defines the structure of a database, including rows, columns, tables, indexes, and so on. You can generate the data definition of a database object using the Generate DDL wizard. The DDL is generated into a .sql file in an Eclipse project, or is executed directly on the specified connection profile. You can use this .sql file to create the same database schema object in a different database, or you can generate the DDL of a complete database to create a new database on a different server. You can edit the .sql file if you want to make changes.

  1. In Data Source Explorer, right click a database, table, user-defined function, user-defined datatype, or a database view.
  2. Select the model elements to include in the DDL script and click Next.
    Table 1. Model elements for DDL generation
    Model element Description
    Fully Qualified Name Use fully qualified names, including database, owner, and object.
    Quoted Identifier Enable the quoted_identifier option that allows the interpretation of delimited strings to be changed.
    DROP Statements Generate SQL drop statements. DROP statements remove an existing object from the database.
    CREATE Statements Generate SQL create statements.
    Comments
  3. Select the model objects to include in the DDL script and click Next.

    The object type determines which model object options are available.

    Table 2. Model objects for DDL generation
    Model object Object type
    Check Constraint database, table
    Foreign Key Constraint database, table
    Indexes database, table
    Primary Key Constraint database, table
    Tables database, table
    Triggers database, table
    Views database
    Stored Procedures stored procedure
    Functions user-defined function
    User Defined Types user-defined datatype
  4. Select the save and run DDL options and click Next.
    Option Description
    Folder Name Enter a project folder or click Browse to select.
    File Name Accept the default or enter file name.
    Preview DDL View a preview of the generated DDL.
    Statement Terminator Accept the default or enter a different one.
    Run DDL on Server Runs the DDL against a connection profile.
    Open DDL File For Editing Opens SQL file in SQL Scrapbook.
  5. (Optional) If you selected Run DDL on Server, select an existing connection profile or click New to create a new one, and then click Next.
  6. Click Finish.
Next If you ran the DDL on the server, see SQL Results view for execution details. If you selected Open DDL File for Editing, the file opens in SQL Scrapbook, where you can view or edit it.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire