search
HomeDatabaseMysql TutorialPowerDesigner 技巧小结

1、PowerDesigner 使用 MySQL 的 auto_increment ◇问题描述: PD怎样能使主键id使用MySQL的auto_increment呢? ◇解决方法: 打开tableproperties窗口→columns→选中id列→打开columnsproperties窗口→勾选identity即可 注意:概念模型没有此选项,物理模

1、PowerDesigner 使用 MySQL 的 auto_increment 
◇问题描述:
PD怎样能使主键id使用MySQL的auto_increment呢?
◇解决方法:
打开tableproperties窗口→columns→选中id列→打开columnsproperties窗口→勾选identity即可
注意:概念模型没有此选项,物理模型才有


2、PowerDesigner 去掉 SQL 脚本中的双引号 
◇问题描述:
PD生成Oracle数据库建表SQL时,默认会给表名和字段名加上双引号,怎样能去掉SQL脚本中的双引号呢?
◇解决方法:
选择Database->Edit current database->Script->Sql->Format,有一项CaseSensitivityUsingQuote,它的 comment为“Determines if the case sensitivity for identifiers is managed using double quotes”,表示是否适用双引号来规定标识符的大小写, 可以看到右边的values默认值为“YES”,改为“No”即可!


3、PowerDesigner 生成S QL 语句时不使用 Domain 
◇问题描述:
如果在PD中使用了Domain,生成SQLServer的数据库SQL的脚本中会使用与Domain对应的自定义数据类型,而不会使用SQLServer自己的数据类型,怎样能让PD生成SQL语句时使用SQLServer自己的数据库类型,而不是Domain对应的自定义数据类型呢?
◇解决方法:
把Database→EditCurrentDBMS→General→Script→Objects→Domain→Enable设置为NO即可


4、PowerDesigner 中设置 Entity 的默认字体 
◇问题描述:
创建Entity时,如果PD默认字体不适合自己的个人习惯,每次创建了一个实体后都要修改实体的字体,非常麻烦,是否有只修改一次一劳永逸的方法呢?
◇解决方法:
Tools→DisplayPreferences...→Format→Entity→Modity...→Font→进行相应修改并保存设置→SetAsDefault


5、PowerDesigner中设置 Entity 自动调整尺寸大小 
◇问题描述:
当给Entity添加了字段或其他修改时,Entiry的显示尺寸大小不会自动调整,怎样解决呢?
◇解决方法:


6、PowerDesigner 中设置表格属性 preview 
◇问题描述:
点击表格属性preview生成的sql语句要怎么修改个,怎样解决呢?
◇解决方法:
在选择的table上点击右键→单击properties...菜单项→选择physicaloptions就可以设置,设置完再点击左下角的applyto
在preview选项里面最上面的工具栏,点击showgenerationoptions可以设置其它生产sql语法的格式。

 

7、在修改 name 的时候,code 的值将跟着变动,很不方便

◇解决方法:
在[Tool]-->[General Options]->[Dialog]->[Operating modes]->[Name to Code mirroring],这里默认是让名称和代码同步,将前面的复选框去掉就行了。

 

8、由pdm生成建表脚本时,字段超过15字符就发生错误(oracle)

◇解决方法:
进入Database - Edit Current DBMS -script-objects-column-maxlen,把value值调大(原为30),比如改成60。出现表或者其它对象的长度也有这种错误的话都可以选择对应的objects照此种方法更改!
或者使用下面的这种方法:
生成建表脚本时会弹出Database generation提示框:把options - check model的小勾给去掉,就是不进行检查(不推荐)!
或者可以修改C:\Program Files\Sybase\PowerDesigner Trial 11\Resource Files\DBMS\oracl9i2.xdb文件
修改好后,再cdm转为pdm时,选择“Copy the DBMS definition in model”把把这个资源文件拷贝到模型中。


 9、PowerDesigner 生成 SQL 时报错

◇问题描述:
生成sql的方法是 Database -->Generate Database (Ctrl + G ) 但是提示

Could not load VBScript engine.
Check VBScript installation.

Generation aborted due to errors detected during the verification of the model.

◇解决方法:
检查了好久 发现将check model 去掉就可以了!其中,

one file on是否需要按照表生成许多个sql(默认选上,即不需要)
odbc generation    sql直接生成到数据库中
Automatic archive   生成sql同时生成apm文件。

check model

powerdesigner有定义每种数据库的表名、字段名等名字的最大长度的,该长度用于powerdesigner作check model的,但是该定义的长度和数据库实际允许的长度不一定相同,如果你希望能通过pd的检查,可以修改pd中的设置(pd对不同数据库的这种约定实际是在保存在一个xml文件中,扩展名为.xdb)!或者你可以直接在生成数据库时选择不check model.
估计pd给出的默认名字长度少于数据库允许长度是给出一种命名习惯,命名不要太长。

 

 10、PowerDesigner 在设计时,如何显示表中的注释选项 
选定一个编辑的表,右键- >Properties- >Columns- >Customize Columns and Filter(或直接用快捷键Ctrl+U)- >Comment(前面打勾)- >OK
PowerDesigner 技巧小结
弹出的窗口中,选中COMMENT
PowerDesigner 技巧小结
确定后注释列就出来了,这样所有的表都是这样的(刚才的操作像是在操作一个模板一样)
PowerDesigner 技巧小结
 

 

 

11、如何用PowerDesigner的导出报告(report)生成数据库设计WORD文档(或HTML格式的文档)?

先显示表的注释信息,然后点 report s-> reports Wizard
PowerDesigner 技巧小结

下一步,选择生成格式,一个是HTML网页格式,另一个是RTF格式,也就是WORD格式,
PowerDesigner 技巧小结

打印模板我选一个Professional,用这个就差不多够了,当然也可以选择别的report template,我之所以用这个,是因为发现模板生成的report有很多我不关心的内容。继续下一步
PowerDesigner 技巧小结
先选择数据表,然后把表名和表的注释选上,注意顺序和宽度,如50MM

PowerDesigner 技巧小结
再选择数据表中的列,然后把列名,列的类型,列长度,列的注释选上,注意顺序和宽度,如50MM

PowerDesigner 技巧小结
 确定   一下就可以了。

 

 

 

1、http://www.cnblogs.com/kfarvid/archive/2011/08/03/2126468.html

2、http://www.blogjava.net/hwpok/archive/2012/01/11/368323.html

3、http://hi.baidu.com/duxing/blog/item/08ade7cd78a9335e0fb345e2.html 

4、http://blog.csdn.net/ziyunlong1984/article/details/5738905

5、http://wenku.baidu.com/view/eecf6b9851e79b89680226be.html

 

 

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What are some tools you can use to monitor MySQL performance?What are some tools you can use to monitor MySQL performance?Apr 23, 2025 am 12:21 AM

How to effectively monitor MySQL performance? Use tools such as mysqladmin, SHOWGLOBALSTATUS, PerconaMonitoring and Management (PMM), and MySQL EnterpriseMonitor. 1. Use mysqladmin to view the number of connections. 2. Use SHOWGLOBALSTATUS to view the query number. 3.PMM provides detailed performance data and graphical interface. 4.MySQLEnterpriseMonitor provides rich monitoring functions and alarm mechanisms.

How does MySQL differ from SQL Server?How does MySQL differ from SQL Server?Apr 23, 2025 am 12:20 AM

The difference between MySQL and SQLServer is: 1) MySQL is open source and suitable for web and embedded systems, 2) SQLServer is a commercial product of Microsoft and is suitable for enterprise-level applications. There are significant differences between the two in storage engine, performance optimization and application scenarios. When choosing, you need to consider project size and future scalability.

In what scenarios might you choose SQL Server over MySQL?In what scenarios might you choose SQL Server over MySQL?Apr 23, 2025 am 12:20 AM

In enterprise-level application scenarios that require high availability, advanced security and good integration, SQLServer should be chosen instead of MySQL. 1) SQLServer provides enterprise-level features such as high availability and advanced security. 2) It is closely integrated with Microsoft ecosystems such as VisualStudio and PowerBI. 3) SQLServer performs excellent in performance optimization and supports memory-optimized tables and column storage indexes.

How does MySQL handle character sets and collations?How does MySQL handle character sets and collations?Apr 23, 2025 am 12:19 AM

MySQLmanagescharactersetsandcollationsbyusingUTF-8asthedefault,allowingconfigurationatdatabase,table,andcolumnlevels,andrequiringcarefulalignmenttoavoidmismatches.1)Setdefaultcharactersetandcollationforadatabase.2)Configurecharactersetandcollationfor

What are triggers in MySQL?What are triggers in MySQL?Apr 23, 2025 am 12:11 AM

A MySQL trigger is an automatically executed stored procedure associated with a table that is used to perform a series of operations when a specific data operation is performed. 1) Trigger definition and function: used for data verification, logging, etc. 2) Working principle: It is divided into BEFORE and AFTER, and supports row-level triggering. 3) Example of use: Can be used to record salary changes or update inventory. 4) Debugging skills: Use SHOWTRIGGERS and SHOWCREATETRIGGER commands. 5) Performance optimization: Avoid complex operations, use indexes, and manage transactions.

How do you create and manage user accounts in MySQL?How do you create and manage user accounts in MySQL?Apr 22, 2025 pm 06:05 PM

The steps to create and manage user accounts in MySQL are as follows: 1. Create a user: Use CREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password'; 2. Assign permissions: Use GRANTSELECT, INSERT, UPDATEONmydatabase.TO'newuser'@'localhost'; 3. Fix permission error: Use REVOKEALLPRIVILEGESONmydatabase.FROM'newuser'@'localhost'; then reassign permissions; 4. Optimization permissions: Use SHOWGRA

How does MySQL differ from Oracle?How does MySQL differ from Oracle?Apr 22, 2025 pm 05:57 PM

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

What are the disadvantages of using MySQL compared to other relational databases?What are the disadvantages of using MySQL compared to other relational databases?Apr 22, 2025 pm 05:49 PM

The disadvantages of MySQL compared to other relational databases include: 1. Performance issues: You may encounter bottlenecks when processing large-scale data, and PostgreSQL performs better in complex queries and big data processing. 2. Scalability: The horizontal scaling ability is not as good as Google Spanner and Amazon Aurora. 3. Functional limitations: Not as good as PostgreSQL and Oracle in advanced functions, some functions require more custom code and maintenance.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version