This step shows you how to use PowerDesigner to generate DDL directly from the data model and save the results in a SQL script that you use to generate the tables and other objects for the target database.
Click Database | Change Current DBMS.
In the Change the Target DBMS dialog, check that the current DBMS is Sybase AS IQ 12.6. If the current DBMS is not Sybase AS IQ 12.6, choose Sybase AS IQ 12.6 in the DBMS drop-down list and click OK.
Click Database | Generate Database.
On the Database Generation dialog, click the browse button, and choose the directory where you want to store the script. Click OK.
In the File name box, type a name for the SQL script. You will use this script in the next procedure.
On the Tables & Views, Keys & Indexes, Database, and Options tabs, set options as listed in the following table:
On this tab... |
In this panel... |
Set these options... |
---|---|---|
Tables & Views |
Tables |
Create table |
Keys & Indexes |
Primary keys |
Create primary key Inside Table |
Keys & Indexes |
Foreign keys |
Create foreign key Outside Declarative Integrity |
Database |
turn all options off |
|
Options |
accept all defaults |
Click the Selection tab. The Selection tab includes two drop-down boxes: the drop-down box on the left is used to choose the RAP model to generate and the drop-down box on the right is used to choose the database owner.
From the drop-down box on the right, choose the IQ database owner, for example DBA.
On the Tables tab, click the Select All button, which is to the right of the database owner drop-down box.
On the Domains tab, choose the IQ database owner, click the Select All button, click Apply, then click OK.
PowerDesigner checks the model for any errors, builds a result list, and generates the DDL. The Result dialog appears, which identifies the name and location of the generated file. You can click the Edit button on the Result dialog to view the generated script. Close the Result dialog.
The Result List dialog appears in the background and may include
several warnings, for example, "Existence of
index"
and "Existence of reference."
These
warnings normally occur during generation.
Close the Result List dialog, then exit PowerDesigner.
If PowerDesigner prompts you to save the current workspace, click No.
If PowerDesigner prompts you to save the model, click Yes only if you want to save the modified model. Otherwise, click No.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |