How to Use Erwin for MySQL-based database design

Source: Internet
Author: User

ERwin is a commonly used tool for database design. It supports many databases. Unfortunately, it does not support MYSQL, probably because few enterprises use MYSQL, but MYSQL is actually very good.

To use ERWIN for MYSQL-based physical design, follow these steps:

(Assume that you already have a well-designed logical model)

1. Install the odbc driver of MYSQL. You can go to MYSQL. COM and download it through a link.

2. Create a user dsn to connect to your MYSQL database in the ODBC management program.

3. Generate a physical model based on ODBC 2.0 from the created logical model.

4. This step focuses on:

Because the database scripts generated based on ODBC are not fully compatible with mysql SQL syntax, you need to do other work. For example, sometimes datetime type is used, but only date type can be generated. We can use an SQL script. ERWIN supports two types of scripts: MODEL-LEVEL and TABLE-LEVEL. the former is for the entire physical model, while the latter can be used for one or more tables. According to the running order, there are two more types:

Pre Script, Post Script. You can see what the name means. If we want to set the TYPE of "CREATE_ON" in the TABLE to DATETIME, we can generate a TABLE-level script:

Alter table % TableName MODIFY CREATE_ON DATETIME % TableName is a built-in macro of ERWIN. There are many other macros. For more information, see help.

You can also define different scripts as needed (for example, you need to set a field to AUTO_INCREMENT ).

5. In forward engineer, select Pre Script and Post Script based on the actual situation and generate the Script.

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.