Explain in detail the conversion between CDM, PDM and SQL of PowerDesigner

Explain in detail the conversion between CDM, PDM and SQL of PowerDesigner

I used PowerDesigner to do some auxiliary work some time ago. Here is a summary:

For the conversion between CDM, PDM, SQL and the transplantation of database table SQL between different databases, we should first understand their respective purposes. Here is a brief description without detailed explanation.

CDM: conceptual data model. CDM describes the E-R diagram in its own way. It does not consider the details of physical implementation, only represents the overall logical structure of the database, and is independent of any software and data storage structure.

PDM: physical data model. The physical implementation of the database is considered, including software and data storage structure, that is, PDM is related to the specific database.

The following is a simple example to briefly describe the conversion between CDM and PDM and SQL, and how to convert from Mysql to Oracle

1、 Mysql_ DB――>PDM――>CDM――>Oracle_ DB means to convert the library table script in MySQL into the corresponding Oracle script;

The required process is to first convert the SQL script in MySQL into its corresponding mysql_ PDM, and then the PDM is converted into CDM. At this time, because CDM is independent of the specific DBMS, we convert CDM into oracle_ PDM, and finally Oracle_ Import PDM into OracleSQL file.

The above process emphasizes that it must be converted to CDM first, because CMD is different from PDM. It has nothing to do with DBMS and only represents the overall logical structure of the database.

The specific operations are as follows:

Install PowerDesigner first

After the installation is completed, in the database

Create the table (of course, MySQL is used for testing here, and only one table is briefly described here. For example, we already have the SQL script file of the database table at this time, and of course, we can also connect it in PowerDesigner.)

Open PowerDesigner and select

File――>Reverse Engineer――>Database

Select the corresponding database type (mysql5.0 is used for the test here):

Then select using script file

Click OK to generate the corresponding mysql_ PDM:

Then select tool - > generate conceptual data model

Or shortcut: Ctrl + Shift + C

The shortcut keys in PowerDesigner are roughly:

PDM: Ctrl + Shift + P

CDM: Ctrl + Shift + C

Oom: Ctrl + Shift + O

That is, it is generated according to letters;

SQL script: Ctrl + G

After obtaining CDM, we can convert CDM into PDM of corresponding DBMS, that is, the shortcut key Ctrl + Shift + P (here we want to generate Oracle, so oracle1g is selected),

As shown in the figure below

Click OK to generate oracle_ PDM

At this time, just use the shortcut Ctrl + G to delete oracle_ Convert PDM into Oracle script SQL file.

After the generation is successful, the only deficiency is that the transformation of stored procedures and triggers is being explored. Not yet.

If you have any questions, please leave a message or go to the community of this site for exchange and discussion. Thank you for reading. I hope it can help you. Thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>