Generating a Database from a PDM

PowerDesigner can generate sophisticated SQL scripts as files or for direct execution via a live database connection.

  1. Select Database > Generate Database to open the Database Generation dialog box (see Database Generation Dialog General Tab).
  2. [when generating scripts] Enter a destination directory and a filename for the script file.
  3. Select the Script generation or Direct Generation radio button.
  4. [optional] Click the Options tab (see Database Generation Dialog Options Tab), and specify creation options for your database objects.
  5. [optional] Click the Format tab (see Database Generation Dialog Format Tab), and specify format options for your database objects.
  6. [optional] Click the Selection tab (see Database Generation Dialog Selection Tab), and specify the database objects to be created. By default all appropriate objects are generated.
  7. [optional] Click the Summary tab (see Database Generation Dialog Summary Tab) to view the summary of your settings and selections.
  8. [optional] Click the Preview tab (see Database Generation Dialog Preview Tab) to preview the database script to be used.
  9. Click OK to begin the generation.

    If you are generating a database script, the Output window shows the progress of the generation process, and gives instructions for running the script. When generation is complete, the Generated Files dialog opens listing the paths to the generated script files. Click Edit to open the script in a text editor or Close to close the Result box.

    Note: For information about the additional steps required to generate for MS Access, see Generating a Microsoft Access Database).

    If you are generating a database directly, and are not currently connected to a database, a dialog box asks you to identify a data source and connection parameters (see Connecting to a Database).

Note: Advanced users can further customize database generation by, for example, changing the order in which objects are generated, adding scripts to run before or after generation, and generating additional objects. For information about these and other advanced topics, see Customizing and Extending PowerDesigner > DBMS Definition Files.