Chapter 13 Generating a Database from a PDM


Modifying a Database

You can modify an existing database schema by synchronizing it with your model. The existing schema can be in the form of:

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.

Steps To modify a database:

  1. Select Database→Modify Database to open the Modify Database dialog box.
  2. Type a destination directory and filename for the script file in the Directory and File Name boxes.
  3. Specify the type of generation to perform. You can choose between a script and an ODBC connection.
  4. Specify how PowerDesigner will obtain the database schema to modify. You can choose between:

  5. If you want to retain your existing data, select the Backup Tables option. If this option is not selected, then all existing data will be erased. For details of this and other options on this tab, see "Modify Database dialog General tab".
  6. [optional] If you want to change the default generation options, then click the Options tab. For more information about these options, see "Modify Database dialog Options tab".
  7. [optional] If you want to change the format of your script, then click the Format tab. This tab has the same functionality as in the Database Generation window (see "Database Generation dialog Format tab").
  8. [optional] If you want to control which database objects will be modified, then click the Selection tab. This tab has the same functionality as in the Database Generation window (see "Database Generation dialog Selection tab")
  9. Click OK. If you are using an ODBC data source, then the ODBC Reverse Engineering window will open, allowing you to select or clear check boxes in the target model for objects that you want to include or remove from the source model. Make your selections and then click OK to continue.
  10. The Database Synchronization window will open. Select or clear check boxes in the target model for objects that you want to include or remove from the model.


    For more information on comparing and merging models, see chapter Comparing and Merging Models in the General Features Guide .
  11. Click OK.


 


Copyright (C) 2006. Sybase Inc. All rights reserved.