PowerDesigner Connect the database to update the database;

First: run Powerdesigner as an administrator

share picture

1. Connect to a database of the server:

Share a picture

Share a picture

share picture

Click on the new data source icon share picture

share picture

Select the data source type: user data source; here it is said that it is only used for the current machine, and it can be used in the actual local area network.

Share a picture

 Share picture

Share picture

share picture

share picture

share picture

< img alt="share picture" src="/wp-content/uploads/images/database/power-designer/1626816352152.png" >

share Picture

Successfully, the connection is successful!

Share a picture

< p>Click OK

————————————— —————————————-

Two. Modify the database: Generate SQL statements to modify the database

Share pictures

share picture

p>

share picture

Share a picture

 Share picture

Share picture

share picture

Share a picture

Share pictures

Look at this part mainly:

Some data cannot be restored from temporary tables:

-> from table dbo.tmp_Animal to table Animal, columns: Species, LatinName, Class, OrderName, Family

-> from table dbo.tmp_EcoTypes to table dbo.EcoTypes, columns: RegionType

-> from table dbo.tmp_EntityData to table EntityData, columns: DATAID

-> from table dbo. tmp_InvadePlants to table InvadePlants, columns: InvadeWay

Use the Animal table as an example to analyze the powerDesigner update database process: first change the backup table Animal table structure and data to tmp_Animal, then modify the Ainmal table structure, and finally insert the tmp_Animal data into the database. In the modified Ainmal table, the insert cannot be inserted, so a warning is prompted!

Compare Ainmail tables

Table structure in the database

Share pictures

Powerdesigner table structure

share picture

Comparison found that the field types are inconsistent.

Special attention:

1 If the database has a certain structure (fields, indexes, etc.) and powerdesigner also has a certain structure (fields, indexes), but the database Unlike the powerdesigner agency, it will prompt a warning! For example, the field types are different.

2 If a structure (table, field, index, etc.) does not exist in the database and a structure (table, field, index) exists in powerdesigner, the structure will be added;

3 If If there is a structure (table, field, index, etc.) in the database and no structure (table, field, index) exists in powerdesigner, the structure will be deleted;

This means data loss, which is very dangerous! Therefore, the database must be backed up every time it is modified. And this modification process may take up the entire database, causing the publishing program to not work properly. Therefore, it is not recommended to do this in a production environment database, which can only be used in a test environment and a development environment.

Second, supplement

share picture

Click help here and the official powerdesigner document will appear:

< img alt="Share a picture" src="/wp-content/uploads/images/database/power-designer/1626816352153.png" width="641" height="668" >

The translation is:

Plus sign Share pictures means to add, not in the database, but in the powerdesigner model.

Minus sign share picture means delete, there is in the database, in the powerdesigner model no.

Equal sign share picture means modification, there is in the database, and also in the powerdesigner model , But the two are not the same.

Click the equal sign and a detailed list will appear, for example:

Share a picture

FromModel (representing the powerdesigner model)

ToDataBase (representing the database relational model)

The column will be FromModel Modify the database.

Double-click the exclamation point share picture to display the text format between the database and the powerdesigner model The difference. The value to be applied is blue, preceded by >>, and the value to be deleted is red, preceded by <<. If it is not for the text format change, no pop-up box will appear.

Share a picture

< p>Movement: indicates that the object has moved from a subset of an object to a subset of another object, (green circle with arrow, gray text and icon) indicates the position before the movement, (with The green triangle of the arrow) indicates the position after the movement. If the modification is also made at the same time, the green triangle changes to a red equal sign.

The yellow exclamation mark share picture indicates that its sub-items have been changed.

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 = 795 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.