First, create an ODBC data source.
1. Open the system ODBC data source and choose "control panel -- Management Tools -- Data Source (ODBC)". You can also configure it in configure connections in the database in powerdesigner.
2. Select the system DSN and click Add. The following interface is displayed. Select the driver that matches the database.Program
3. The data source is successfully created. You can use the data source name to perform a connection test.
Ii. Reverse Engineering
1. Select reverse engineer database under the database menu. The database reverse engineering dialog box is displayed. Select using an ODBC data source and select "gdzj" as specified above the ODBC data source"
2. Click "OK" to display all tables, views, and users in the database (select the users of the database ). Select as needed and convert to PDM.
Use SQL scripts to reverse engineer and generate PDM
If you have not only a database that is being used, but you have a script for creating a database, you're lucky! Because the model generated by A. SQL script does not have the disadvantages of using a database, the specific operation is as follows:
1. Database SQL script file crebas. SQL.
2. Create a PDM, select database ---> reverse engineer database, and select using script files
Export the database creation script after the model is generated
The imported model is used to modify and export the database creation script. the operation method is as follows:
Select database ---> Generate Database
Select the database user, select the table to be exported, and click OK. If the script cannot be properly generated and a model error is prompted, remove the check modle option in options and click OK, generate an SQL script,
Do not try to use the generated script because it may be a problem. Open the script with notepad or other tools and you will find that "" is added to the name of the script, use Ctrl + H to replace all values with null!