1. Install PowerDesigner
Reference
https://blog.csdn. net/sinat_34104446/article/details/79885141
2 Configuration reverse engineering
2.1 New model pdm< /h3>
New model PNG
Note: DBMS select MYSQL5.0
/div>
Configure link PNG
< div class="image-view" data-width="644" data-height="584"> New database link-01.png
< span>Configuration link PNG
com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.151:3306/nbspider
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
Modify model 01.png
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.
Export foreign key configuration button
- click OK
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:
image.png
Edit table name
image.png< /span>
Show comment column
-
Enter preferences
Display code.png
- Select code
image.png< /span>
https://blog.csdn.net/qq_17010367/article/details/79212850
Custom column attribute button
Display code Lebanon
The effect after setting is as follows:
image. png
-
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:
image.png
< div class="image-view" data-width="667" data-height="468"> 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>
image.png
- The effect after execution is as follows:
Final effect picture Banyu
< /div>
3. How to add comments when PowerDesigner exports SQL
- Reference:https
- Reference:https span>: //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
New model PNG
Note:< /strong> DBMS select MYSQL5.0
Configuration link PNG
New database link-01.png
Configure Link Button
com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.151:3306/nbspider
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
Modify model 01.png
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.
Export foreign key configuration button
- click OK
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:
image.png
Edit table name
image.png
Show comment column
-
Enter preferences
Display code.png
- Select code
< div class="image-view" data-width="931" data-height="578"> image.png
https://blog. csdn.net/qq_17010367/article/details/79212850
Custom column attributes PNG
Display code Lebanon
The effect after setting is as follows:
image.png
-
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:
image.png
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>
image.png
- The effect after execution is as follows:
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
New model PNG
New model PNG
< /div>
Configure Link Button
New database link-01.png
Configuration link PNG
< div class="image-container -fill">
Test connection to PNG
Modify model 01.png
Modify model 02.png
< img alt="share Picture "src="/wp-content/uploads/images/database/power-designer/1626816353308.png
Select the exported database PNG
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
Note: DBMS select MYSQL5.0
/div>
< div class="image-view" data-width="644" data-height="584"> New database link-01.png
com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.151:3306/nbspider
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
-
In addition, if the exported data volume structure needs to export foreign keys and other relations, Then choose the following options as appropriate.
Export foreign key configuration button- click OK
Choose the exported database PNGSelect 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:
image.pngEdit table name
image.png< /span>Show comment column
-
Enter preferences
Display code.png- Select code
image.png< /span>https://blog.csdn.net/qq_17010367/article/details/79212850
Custom column attribute buttonDisplay code LebanonThe effect after setting is as follows:
image. pngIn 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:
image.png< div class="image-view" data-width="667" data-height="468"> 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>image.png- The effect after execution is as follows:
Final effect picture Banyu< /div>
3. How to add comments when PowerDesigner exports SQL
- Reference:https
- Reference:https span>: //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
- Reference:https span>: //jingyan.baidu.com/album/47a29f24652e44c0142399c3.html ? picindex
1. Install PowerDesigner
Reference
https://blog.csdn.net/sinat_34104446/article/details/79885141< /p>2 Configuration reverse engineering
2.1 New model pdm
New model PNGNote:< /strong> DBMS select MYSQL5.0
Configuration link PNG
New database link-01.pngConfigure Link Buttoncom.mysql.jdbc.Driver jdbc:mysql://192.168.0.151:3306/nbspider
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 directorySet 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
Modify model 01.pngModify 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.
Export foreign key configuration button- click OK
Choose the exported database PNGSelect 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:
image.pngEdit table name
image.pngShow comment column
-
Enter preferences
Display code.png- Select code
< div class="image-view" data-width="931" data-height="578"> image.png
https://blog. csdn.net/qq_17010367/article/details/79212850
Custom column attributes PNG
Display code LebanonThe effect after setting is as follows:
image.pngIn 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:
image.pngimage.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>image.png- The effect after execution is as follows:
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
New model PNGNew model PNG
< /div>Configure Link ButtonNew database link-01.pngConfiguration link PNG< div class="image-container -fill">Test connection to PNGModify model 01.pngModify model 02.png< img alt="share Picture "src="/wp-content/uploads/images/database/power-designer/1626816353308.pngSelect the exported database PNGimage.pngimage.png显示code.pngimage.png自定义列属性巴纽显示代码列巴纽image.pngimage.pngimage.pngimage.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
- Select code
- click OK
- Select code
- click OK