[Nanny Tutorial] Use PowerDesigner to export the database table structure as a Word/Excel table

Use PowerDesigner to export the table structure to a word form

1. Download and install PowerDesigner (installed skip)

After the PowerDesigner download address,
Installinsert image description here
insert image description here
insert image description here
insert image description here
just next>>next>>finish
insert image description here
insert image description here
insert image description here

Copy the files in the track directory to the installation directory, and replace the source files (this step is not necessary)

2. Create a module and configure a database connection

1. File -> New Model

insert image description here

Select Physical Data, the database is selected according to your own database type, here I am using MySQL

insert image description here

2. Configure the database connection

Note: The premise of using JDBC connection with PowerDesigner is that the 32-bit version of JDK must be installed locally

insert image description here

insert image description here

3. Test connection, possible errors and solutions

insert image description here

1. Could not Initialize JavaVM!

insert image description here
The 32-bit JDK environment is not installed on this machine, or the JDK environment variable is not configured, which can java-versionbe

insert image description here
Note: After modifying the environment variables, you need to restart the computer to take effect

3. Reverse engineering, import database table structure

1. File->Reverse Engeneer->DataBase

insert image description here

Select the database type according to your needs, here I am using MySQL

insert image description here

2. Select data source

insert image description here

Select the connection configuration we just created (if you haven’t created a configuration before, you can also configure it here)

Enter username and password, click connect

insert image description here

After selecting the database connection, click OK

insert image description here

3. Select the database table to export

By default, all tables are selected

insert image description here

4. Click OK

insert image description here
insert image description here

4. Report configuration and export

1. Report->Reports->New Report

insert image description here

2. Select Chinese, select standard template

insert image description here

3.Report items configuration

insert image description here

Right mouse button, click the list of table columns, configure Layout

insert image description here

  1. Check the attributes to be exported

    Name The field name of the database table, such as id

    DataType is the data type of the table field, such as bigint

    Length is the length of the table field, such as 128

    Mandatory indicates whether it is necessary, that is, non-empty, such as True

    Comment is a table field comment, such as id is a primary key field

  2. Set the column width of the table corresponding to the attribute, and the unit can be mm or %

  3. Adjust the order in which attributes are listed in the exported table (from left to right)

  4. click OK

insert image description here

After the setting is complete, you can click Print, Preview or Export.
insert image description here
The second button is preview, the third button is print, the fourth button is export html file, and the fifth button is export rtf file. After exporting the rtf file, it can be used word open, convert to doc/docx file

Guess you like

Origin blog.csdn.net/q863672107/article/details/124622098