Database Create SQL Script


This chapter is composed of :

  1. Introduction
  2. Database Create SQL Script
    1. Database Create SQL Script Page
      1. Script Name
      2. Database Name
    2. Finish
  3. Templates
  4. Additional Resources

1. Introduction

The purpose of this chapter is to show how to generate a Create SQL Script.

When forwarded to your Database, this script will be able to initialize a Database.

 

2. Database Create SQL Script

To start the Database Create SQL Script wizard, select :

File->New->Other->Database->Database Create SQL Script

or

Select an object in the Package Explorer View or the Navigator View then right-click and select :

New->Other->Database->Database Create SQL Script

The selection is contextual.

This means that if you select an existing Database Object :

 

 

The wizard will open the parent Database Connection in update mode.

 

Otherwise:

 

 

A new Database Connection wizard will be opened starting with a New Folder selector.



In Database Connection Update mode this wizard has four pages :

In Database Connection Create mode this wizard has five pages :

 

2.1. Database Create SQL Script Page

 

 

 

2.1.1. Script Name

Script Name is the name of your new SQL script.

Each resource should have a unique name in the targeted selected workspace folder or project root.

This data is not related to any Meta Data informations.

This name will be the file name of the generated SQL script file.

Its file extension is :

This file is referenced in your current Database Connection.

 

2.1.2. Database Name

Database Name is the name of your database.

 

2.2. Finish

The script generation of the new Database Create SQL Script will be processed and created.

 

 

Detailed information is available in the DatabaseConsole window.

 

 

Some databases don't support the drop database and create database statements.

A message is displayed in the Database Connection page.

 

3. Templates

This wizard is Template based.

Below your Plugin Templates or MyTemplates you should see the following directory:

Torque/sql/db-init

 

 

These templates are Velocity based and use the Torque Model API.

 

4. Additional Resources

Here are several links provided for further Apache Velocity related information.