| etienno@gmail.com 2005-06-02, 3:59 pm |
| Hi,
I am using PowerDesigner and I would like to generate a DDL of my
schema but using the "Name" reference instead of the Code reference for
the naming of the Table Name, Column Name, Promary key contraint name
and Foreign key. I need that to create a database with understandable
name for testing and development purpose only.
I have manage to set in "DATABASE->EDIT CURRENT DBMS->DBMS
Properties:General" theses DDL generation SCRIPTS:
Table Create:
create table [%QUALIFIER%]%TNAME% (
%TABLDEFN%
)
[%OPTIONS%]
Column Add:
%20:COLNNAME% %30:DATATYPE%[ default %DEFAULT%][%IDENTITY%? identity:[
%NULL%][ %NOTNULL%]][%R%?[ default %DEFAULT%]][%InRow%? in row:[%R%?
off row]]
[%CONSTDEFN%]
But when generate the SQL Preview, the DDL is like this:
/ *=======================================
=======================*/
/* Table: GNREGR00 */
/ *=======================================
=======================*/
create table BranchAdminGroup ( <- THIS IS OK for the Table name!
branchAdminGroup char(6) not null, <-
THIS IS OK for the column name!
name char(40) not null,
managedByUser char(10) not null,
division char(6) not null,
createDate numeric(8) not null,
createTime numeric(4) not null,
createUser char(10) not null,
lastMaintDate numeric(8) not null,
lastMaintTime numeric(4) not null,
lastMaintUser char(10) not null,
constraint PK_GNREGR00 primary key (RGREGR), <- THIS IS THE PROBLEM
(1)!
constraint belongs_to_division foreign key (RGDIVI) <- THIS IS THE
PROBLEM (2)!
references GNDIVI00 (DIDIVI) <- THIS IS THE PROBLEM (3, 4)!
)
go
Does anyone know how (what is the script and where to put it?) I can
get
1- the "NAME" instead of the Code for the promary key definition,
2- the foreign key definition (name instead of code)
3- reference to table name instead of table code
4- the reference column name instead of code...
Thanks
Etienne
Montreal
|