PowerDesigner generates a Mysql band

1. Install PowerDesigner

Reference
https://blog.csdn. net/sinat_34104446/article/details/79885141

2 Configuration reverse engineering

2.1 New model pdm< /h3>

share picture New model PNG

Note: DBMS select MYSQL5.0

/div>

share picture Configure link PNG

< div class="image-view" data-width="644" data-height="584"> share picture New database link-01.png

share picture < span>Configuration link PNG

com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.151:3306/nbspider 
share picture Test connection to PNG < /div>

Frequently asked questions:
JavaVM cannot be initialized!
This is because powerdesiger requires 32-bit jdk If you don’t want to modify the environment variables, you can configure the script startup-classpath.bat in the powerdesiger installation directory

Set JAVA_HOME=C :\Java\jdk1.8.0_181-32 Set CLASSPATH =C:\Java\repo\mysql\mysql-connector-java\5.1.45\mysql-connector-java-5.1.45 .jar pdshell16.exe 

2.2 Modify the model according to the database link

share picture Modify model 01.png

Share a picture Modify model 02.png

  • In addition, if the exported data volume structure needs to export foreign keys and other relations, Then choose the following options as appropriate.

    Share picture Export foreign key configuration button

  • click OK
    share picture Choose the exported database PNG

    Select the database to be exported, you can first Select "ALL users", deselect all, then select the database to be reverse engineered, and then click select all.

2.3 Generate Reverse Engineering

The effect is as follows:

share picture image.png

Edit table name

Share pictures image.png< /span>

Show comment column

  1. Enter preferences

    share picture Display code.png

  2. Select code
    Share pictures image.png< /span>

    https://blog.csdn.net/qq_17010367/article/details/79212850

    Share a picture Custom column attribute button

    share picture Display code Lebanon

    The effect after setting is as follows:

    Share a picture image. png

  3. In PowerDesigner, the code and name fields of the table structure are all in English, which is not easy to read. If you need to add the If the field is replaced to the name field, the execution method: Tool-execute command-edit/run script, the following dialog box will pop up:

    share picture image.png

< div class="image-view" data-width="667" data-height="468"> share picture image.png

  • Vb script code As follows:
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch

Dim mdl 'the current model'get the current active model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "There is no current Model "ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox "The current model is not an Physical Data model." Else ProcessFolder mdl End If  'This routine copy name into code for each table, each column and each view'of the current folder Private sub ProcessFolder(folder) Dim Tab 'running table for each Tab in folder.tables if not tab.isShortcut then if len(tab.comment) <> 0 then tab.name = tab.comment end if On Error Resume Next Dim col'running column for each col in tab.columns if len(col.comment) <>0 then col.name =col.comment end if On Er ror Resume Next next end if next end sub < /span>

After execution, you can save the VBScript locally, and execute it next time Execute the local script at time


/div>

share picture image.png

  1. The effect after execution is as follows:
share picture Final effect picture Banyu

< /div>

3. How to add comments when PowerDesigner exports SQL

  • Reference:https

  • Reference:https: //jingyan.baidu.com/album/47a29f24652e44c0142399c3.html ? picindex
    = 2

4. #PowerDesigner generates mysql field comments Notes

  • Reference:https: //www.cnblogs.com/kangxuebin/articles/3688146.html

5. PowerDesigner exports PDM to generate WORD documents

https://blog.csdn.net/ni_hao_ya/article/details/51282618

1. Install PowerDesigner

Reference
https://blog.csdn.net/sinat_34104446/article/details/79885141< /p>

2 Configuration reverse engineering

2.1 New model pdm

share picture New model PNG

Note:< /strong> DBMS select MYSQL5.0

share picture Configuration link PNG


share picture New database link-01.png

share picture Configure Link Button

com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.151:3306/nbspider 
share picture Test connection to PNG < /div>

Frequently asked questions:
JavaVM cannot be initialized!
This is because powerdesiger requires 32-bit jdk If you don’t want to modify the environment variables, you can configure the script startup-classpath.bat in the powerdesiger installation directory

Set JAVA_HOME=C :\Java\jdk1.8.0_181-32 Set CLASSPATH =C:\Java\repo\mysql\mysql-connector-java\5.1.45\mysql-connector-java-5.1.45.jar pdshell16. exe 

2.2 According to the database Link to modify the model

Share picture Modify model 01.png

share picture Modify model 02.png

  • In addition, if the exported data volume structure needs to export foreign keys and other relations, choose the following as appropriate options.

    Share a picture Export foreign key configuration button

  • click OK
    share picture Choose the exported database PNG

    Select the database to be exported, you can first Select "ALL users", deselect all, then select the database to be reverse engineered, and then click select all.

2.3 Generate Reverse Engineering

The effect is as follows:

Share picture image.png

Edit table name

share picture image.png

Show comment column

  1. Enter preferences

    share picture Display code.png

  2. Select code

    < div class="image-view" data-width="931" data-height="578"> share picture image.png

    https://blog. csdn.net/qq_17010367/article/details/79212850

    share picture Custom column attributes PNG


    Share a picture Display code Lebanon

    The effect after setting is as follows:

    share picture image.png

  3. In PowerDesigner, the code and name fields of the table structure are all in English , It’s not easy to read. If you need to replace the field in the remarks with the name field, the execution method: Tool-execute command-edit/run script, the dialog box shown in the figure below will pop up:


    share picture image.png

share picture image.png

  • Vb script code is as follows:
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch

Dim mdl 'the current model'get the current active model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "There is no current Model "ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox "The current model is not an Physical Data model." Else ProcessFolder mdl End If  'This routine copy name into code for each table, each column and each view'of the current folder Private sub ProcessFolder(folder) Dim Tab 'running table for each Tab in folder.tables if not tab.isShortcut then if len(tab.comment) <> 0 then tab.name = tab.comment end if On Error Resume Next Dim col'running column for each col in tab.columns if len(col.comment) <>0 then col.name =col.comment end if On Er ror Resume Next next end if next end sub < /span>

After execution, you can save the VBScript locally, and execute it next time Execute the local script at time


/div>

share picture image.png

  1. The effect after execution is as follows:
share picture Final renderings of PNG

< span>3. How to add comments when PowerDesigner exports SQL

  • Reference:https:/ /jingyan.baidu.com/album/47a29f24652e44c0142399c3.html ? picindex
    = 2

4. #PowerDesigner generates mysql field comments Notes

  • Reference:https: //www.cnblogs.com/kangxuebin/articles/3688146.html

5. PowerDesigner exports PDM to generate WORD documents

https://blog.csdn.net/ni_hao_ya/article/details/51282618

share picture New model PNG

Share pictures
​ < /div>

share picture Configure Link Button

share picture
share picture New database link-01.png

share picture
share picture Configuration link PNG

Share picture < div class="image-container -fill">
share picture Test connection to PNG

share picture
share picture Modify model 01.png

Min Share pictures
share picture Modify model 02.png

Share a picture

< img alt="share Picture "src="/wp-content/uploads/images/database/power-designer/1626816353308.png

Export foreign key configuration button

Share pictures
share picture Select the exported database PNG

Share picture
 
分享图片 image.png

 
分享图片
 
分享图片 image.png

 
分享图片
 
分享图片 显示code.png

 
分享图片
 
分享图片 image.png

 
分享图片
 
分享图片 自定义列属性巴纽

 
分享图片
 
分享图片 显示代码列巴纽

 
分享图片
 

分享图片 image.png

 
分享图片
 
分享图片 image.png

 
分享图片
 
分享图片 image.png

 
分享图片
 
分享图片 image.png

 
分享图片
 
分享图片 最终效果图巴纽

 

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 837 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.