Erwin is commonly used for database design tools, support a large number of databases, but not support MySQL, probably because few companies use MySQL bar, but MySQL is actually very good.
In order to be able to use Erwin to perform physical design based on MySQL database, the following methodological steps can be used:
(assuming you already have a well-designed logical MODEL)
1. Install MySQL ODBC DRIVER, you can go to mysql.com, there are links can download.
2. Create a user DSN in the ODBC management program that connects to your MySQL database.
3. Build a physical model based on ODBC 2.0 from the established logical model.
4. This step is focused on:
Because ODBC-generated database scripts are not fully compatible with MySQL's SQL syntax, you need to do some other work. For example, sometimes you need to use the datetime type, but you can only generate the date type, we can do it with SQL script, there are two kinds of scripts supported by Erwin: Model-level, Table-level. The former is for the whole physical MODEL, and the latter can be used for one or more table. According to the order of operation, there are two kinds:
Pre script, Post script. I know the meaning by looking at the name. 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 Erwin-brought macro, as well as many other macros, for which you can see Help.
You can also define different script depending on your needs (for example, you need to set a field of auto_increment).
5. Select Pre Script,post Script in forward engineer, then generate it.