You can modify an existing database schema by to reflect changes in your model. The PDM (source model) and the existing database schema (target model) are merged using a database synchronization window, which allows you to choose which objects are added, deleted, or updated in the target.
Script generation - generate a script to be executed on a DBMS at a later time. Optionally select One file only to create the generation script as a single file. By default, a separate script file is created for each table.
Direct generation – generate a script and execute it on a live database connection. Optionally select Edit generation script to open the script in an editor for review or editing before execution.
Archive model – Click the button to the right to browse to the archived model (see Archive PDMs).
Data source – Click the button to the right to connect to your data source.
Script file – Select a script from the list or click the button to the right to browse to the script.
Model from repository – Select a model from the list and optionally click the button to the right to browse to a version of it.
Option |
Description |
---|---|
Always use create statements/ Use alter statements when possible |
Specify whether create statements should always be used to modify database tables, or whether alter statements should be used where possible. |
Backup tables |
Specifies that any existing table will be copied to a
temporary backup during the modification, and then
restored to the updated tables. If this option is not
selected, then all existing data will be erased. If you
select this option then you can also specify to :
|
Check model |
Specifies that a model check is performed before script generation. |
Automatic archive |
Creates an archive version of the PDM after generation to use to determine changes during your next database modification (see Archive PDMs). |
You can save your selection via the Selection bar at the bottom of the tab (see Quick Launch Selection and Settings Sets).
For more information about comparing and merging models, see Core Features Guide > Modeling with PowerDesigner > Comparing and Merging Models.
If you are generating a script, a result box opens listing the file path of the generated file. To open the script in a text editor, select the file in the result box and click the Edit button.
If you are generating a database directly, a Data Source connection box is displayed. Type your connection details and click the Connect button. A message box shows the progress of the generation process. At the end of generation click OK to close the box.