PowerDesigner generating comment annotations for MySQL PDM

Source: Internet
Author: User
Tags powerdesigner

PowerDesigner generating comment annotations for MySQL PDM

The default PD does not generate comments and can be modified as follows for mysql5.0.
At the Database-->edit current DBMS ...

Set the properties of the DBMS to find the Mysql5.0-->script-->objects-->column-->add

Put the original content:

%20:column% [%national%?national]%datatype%[%unsigned% unsigned][%zerofill%? zerofill][[. O:[character Set][charset]]%charset%][. z:[%notnull%][%identity% auto_increment:[Default%default%]][comment%.q: @OBJTLABL%]]

Switch

%20:column% [%national%?national]%datatype%[%unsigned% unsigned][%zerofill%? zerofill][[. O:[character Set][charset]]%charset%][. z:[%notnull%][%identity% auto_increment:[default%default%]][comment%.q:comment%]]

Oh, in fact, only the last objtlabl changed to comment on the line. Before the objtlabl don't know what to refer to, know the friend tell ...

The generated code has a comment for each field:

CREATE TABLE Code
(
CODE_ID INTEGER NOT NULL comment ' code ID ',
Code_no VARCHAR (TEN) not null comment ' code encoding ',
Code_chinese_name VARCHAR () Not null comment ' Chinese name ',
Code_english VARCHAR (a) Comment ' English name ',
parent_code_id INTEGER Comment ' Parent code ID ',
Code_type VARCHAR (Comment ' code type '),
Sort_no INTEGER Comment ' Code number ',
create_by INTEGER comment ' record creator ',
Create_date TIMESTAMP comment ' record creation time ',
update_by INTEGER comment ' record update person ',
Update_date TIMESTAMP comment ' record update time ',
Primary KEY (CODE_ID)
);

Notes for the table:

To set the properties of the DBMS, locate mysql5.0-->script-->objects-->table-->tablecomment:

Value, add the following:

ALTER TABLE [%qualifier%]%table% comment%.60qa:comment%

When added, the following statement is generated:

ALTER TABLE code comment ' Codes table ';

Code generation:

Click menu Database-->generate Database

The Database Generation screen appears: In the Format tab, tick generate name in empty comment

Click OK to generate the appropriate code, and the comments above will appear in the code.

PowerDesigner generating comment annotations for MySQL PDM

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.