Generate MSYQL database reverse engineering with Power Designer

xiaoxiao2021-03-06  94

PowerDesigner is a nice database modeling tool, but if you use the mysql database, few people use it to build a model, because MySQL is a relatively simple (but fast) excellent database, does not support stored procedures, triggers , Bussiness Rules, transaction (some table type support, the most commonly used Myisam does not support), but if it is later, it is necessary to organize it, or just start using the PD model, and then did not do the database synchronization, table When modified, it is possible to generate a physical model (PDM) by the SQL file with the reverse engineering.

First get the original SQL file, you can export the data structure by the phpMyAdmin export function, saved as .sql file

Probably as follows:

Create Table `TB_TEST` (` Test_ID` int (10) unsigned not null auto_increment, `test_name` VARCHAR (50) Not null default ',` test_sex` enum (' male ',' female ') Not null default' male ' , `Test_pwd` VARCHAR (50) Not null default ', primary key (` Test_id`), key `test_name` (` Test_name`) type = imeisam auto_increment = 1;

Then open the POWERDESigner recommended to use the PD10.0 version, 9.5 MYSQL support for some versions is not very good, (MySQL3.23 Unable to generate reverse projects on PD95) Point - New- "Select Physical Data Model, DBMS Selection Mysql 4.0, as shown in the figure:

Point OK will appear in the workspace of Power Designer, then select Reverse Engineer- "Database, the window shows the window

Continue point OK, choose DBMS: MySQL 4.0 Continue to determine ...

If Using Script files are not selected, select it, click Add Files, select Test that just exported with phpmyadmin. SQL is shown in the figure:

Continue point to determine ... After closing your eyes 1-10 seconds, I found that PDM (physical concept model) has been generated, as shown in Figure 4:

Modify according to the actual situation, add a comment, modify the Name value, record the "name" is the title, "code" is the content, don't make it back ~~~ After this work, use Power Designer a powerful function, report Print, PD report printing function is very powerful, you can choose different templates, generate RTF or HTML, you can choose printing types and printed items according to your hobby, you can choose some typesetting, such as fonts, forms Width, etc.

Create Report icon in the point toolbar, behind the help icon, if you can't find the help icon, look at this picture.

There will be a window in the future, click "New Report", select Simplified Chinese in Language Option, then determine, OK, the report editing window comes out to the left is the optional report item, the right side is selected, you can use the preview function effect

Simple choice, look at the effect

PHP report function is very good, you can customize your report, you can choose a specific item in Layout, such as do not comment, show some specific items, take a look, perhaps new discovery

If you have any simple questions, you can send me an email qupengs at msn .com

Now China's only PD tutorial "PowerDesigner database system analysis design and application"

转载请注明原文地址:https://www.9cbs.com/read-122751.html

New Post(0)