Build MySQL database using PowerDesigner design
I. Create a library script using PowerDesigner
1. Design CDM (conceptual Data Model)
2, choose Tools--Generate physical Data Model, select the corresponding DBMS for MySQL, generate PDM
3, select database, Generate database, in the Database Generation dialog box to select the script access path and script file name
4. Click OK to generate database Build library script (*.sql)
There are 2 ways to execute SQL scripts:
The first method:
At the command line (not connected to the database), enter mysql-h localhost-u root-p123456 < F:/mytest/testdb.sql (Note that the path is not quoted!!) to enter.
The second method:
At the command line (the database is connected, the prompt is mysql>), enter the source F:/mytest/testdb.sql (note that the path is not quoted) enter
Implementation of PDM-to-MySQL database conversion in PowerDesigner