Although the latest MySQL installation files contain MySQL Workbench, which facilitates modeling and database generation, the best database modeling tool is Sybase's PowerDesign, which allows us to easily build a model at a time, A Sihai database.
The following describes how to export a database from PowerDesign to MySQL (I use PowerDesigner 15 and MySQL5.5.22 ):
1. Database-> Configure Connections...
In the pop-up dialog box, switch to the Connection Profiles column. Click the Add Data Source (Ctrl + N) icon to bring up the Connection Profile Definition dialog box. Fill in the relevant content. The key examples are as follows:
Connection type: JDBC
DBMS type: MySQL
User name and Password are MySQL database account and Password
JDBC driver class: com. mysql. jdbc. Driver
JDBC connection URL: jdbc: mysql: // localhost: 3306/database(Note that the database must be the name of the database created in MySQL)
JDBC driver jar files: mysql-connector-java-3.1.x-bin.jar(Note that if you use the jar file of the PowerDesign package, Non SQL Error: cocould not load clas com. mysql. jdbc. driver error. After changing the jar file to a higher version, for example, I used mysql-connector-java-5.1.7-bin. jar, the connection test is successful ).
2. Database-> Connect...
In the displayed dialog box, Data source: Connection profile: XXX. dcp and Connect after Login are selected.
3. Change current DBMS...
In this step, select MySQL5.0 or the DBMS that matches your database.
4. Generate Database...
If you want to export data to the MySQL database, this is a small step. In the Generation type option, Script generation only generates the SQL file associated with the database type. If you want to export the file directly to the database at the same time, click Direct generation and select the previously created XXX. dcp: Click OK. If you want to customize the output of some database tables, specify in the corresponding label bar, after the console outputs a series of commands, an Execute SQL Query dialog box is displayed. After you click run, the database will be displayed in the MySQL database!