1. Install PowerDesigner
Reference
https://blog.csdn. net/sinat_34104446/article/details/79885141
2 Configuration reverse engineering
2.1 New model pdm< /h3>
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:
Edit table name
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. 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>
- The effect after execution is as follows:
< /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
Note:< /strong> DBMS select MYSQL5.0
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 According to the database Link to modify the model
-
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:
Edit table name
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 LebanonThe 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
- 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>
- The effect after execution is as follows:
< 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
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