Database reverse engineering using powerdesigner

Source: Internet
Author: User
Tags powerdesigner

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!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.