PowerDesigner conversion between CDM, PDM, and SQL

Source: Internet
Author: User
Tags powerdesigner

Some time ago with the next powerdesigner do some auxiliary work, here specifically summarized:

For the migration of the SQL between the CDM, PDM, SQL and database tables between different databases, the first thing to know is what they are used for, a simple description here, not a detailed explanation.

CDM: Conceptual data Model. CDM is to describe the E-r diagram in its own way. It does not take into account the physical implementation details, only represents the overall logical structure of the database, independent of any software and data storage structure.

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


Here's a simple example of how the transformation between CDM and PDM and SQL, and how to turn from MySQL to Oracle

First, mysql_db-->pdm-->cdm-->oracle_db

This means that the Library table script in MySQL will be translated into the corresponding Oracle script;

The process required is to first convert the SQL script in MySQL to its corresponding MYSQL_PDM, and then from this PDM to the CDM, when the CDM is not related to the specific DBMS, so at this time we turn the CDM into ORACLE_PDM, and finally this Oracle_ PDM leads to oraclesql files.

The above process emphasizes the need to turn to CDM first, since CMD differs from PDM, which is not DBMS-independent, but represents the overall logical structure of the database.


Here's how:

Install PowerDesigner First


After the installation is complete, in the database

Create a good table (of course, the test MySQL here, here is just one of the tables, for example, we already have the database table SQL script file, of course, can also be connected in PowerDesigner. )


Open PowerDesigner and select

File-->reverse Engineer-->database



Select the appropriate database type (Mysql5.0 is used here for testing):




Then select the Using Script File



When you click OK, the corresponding MYSQL_PDM will be generated:




Then select Tool-->generate Conceptual Data Model

or the shortcut key: Ctrl+shift+c

The shortcut keys in PowerDesigner are roughly:

PDM is: ctrl+shift+p

CDM namely: Ctrl+shift+c

OOM is: ctrl+shift+o

That is, it is generated according to letters;

SQL script: Ctrl+g




After we get the CDM, we can turn the CDM into the PDM of the corresponding DBMS, namely: Shortcut key ctrl+shift+p (here we're going to build Oracle, so we chose oracle1g),

As shown




Click OK to become a ORACLE_PDM



Just use the shortcut key ctrl+g to turn ORACLE_PDM into an Oracle script SQL file.

After the success of the build, the only point is that the conversion of stored procedures, triggers, etc. is being explored. It hasn't been realized for the moment.

The above content briefly introduces the simple conversion between CDM and PDM and SQL, and the related PowerDesigner database and Oom, Entity class will be shared in the following articles!!!

PowerDesigner conversion between CDM, PDM, and SQL

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.