The prerequisite for using PDM reverse engineering is to install the PowerDesigner, Oracle database, and then to configure an Oracle data source using an ODBC data source, and then start with a detailed introduction to using PDM reverse engineering.
ODBC data source Configuration here do not introduce, I believe most of the compatriots will, will not be a little bit Baidu can.
1, first open the local installed PDM software, and then select "File-Reverse engineering-database ..." such as:
2, after the completion of the 1th step will pop up the next window, Model name can be self-named, because this article is based on Oracle, the DBMS option select the appropriate version of Oracle, as shown in:
3, the completion of the 2nd step after clicking "OK" will pop up the following window, the first behavior of the 2nd selection of the DBMS, without modification, click the red Circle button into the next configuration see 4th Step explained, as shown in:
4, the completion of the 3rd step after the following window, the configuration of the data source, the following 1th image is marked with a red mark is the article began to refer to the pre-configured ODBC data source, after the selection is completed, click on the 2nd image below the red circle labeled button will pop up below the 3rd map, The 3rd diagram needs to be related to the ODBC-driven configuration, the need to pay attention to the figure has been marked with red, the configuration is completed after entering the 4th map, this figure needs to fill in the login database user name and password, fill in the correct click "Connect" will return to the original page of the following 5th map, Click on the "OK" button in the 5th image to proceed to the next step, 5 images are as follows:
5, the completion of the 4th step will pop up the following window, in this window can see the current configuration of the database related objects "table, view, etc.", according to their own needs to select the appropriate object after clicking "OK" began to enter the reverse engineering, waiting for the progress bar reached 100% to complete the reverse engineering, as shown:
6. After completing the 5th step, the database object model can be seen, but you may find a problem: the name in the table "Model" and the name in the field are shown in the following 1th figure, and are not consistent with the comments in the table structure seen in PL/SQL. It does not look very convenient, and next describes how to synchronize the comments "annotations" in the database tables to the PDM table "Model":
7, as shown in the 1th picture below, select "Tools-execute commands-edit/run Script ..." will pop up the following 2nd picture, copy the following code into this window click "Run", you will find that the PDM table model into the Chinese as follows 3rd map " The premise is that the tables in the database have comments ".
Option ExplicitValidationmode =TrueInteractivemode = Im_batchDimmdl' the current model' Get the current active modelSetMDL = ActivemodelIf(MDL is Nothing) ThenMsgBox"There is no current Model"ElseIf notmdl. IsKindOf (Pdpdm.cls_model) ThenMsgBox"The current model isn't an physical Data model."ElseProcessFolder MDLEnd If' This routine copy name to code for each table, each column and each view' of the current folderPrivate SubProcessFolder (folder)DimTab' Running table for eachTabinchFolder.tablesif notTab.isshortcut ThenifLen (tab.comment) <>0 ThenTab.name = Tab.commentEnd if on Error Resume NextDimCol' running column for eachColinchTab.columnsifLen (col.comment) <>0 ThenCol.name =col.commentEnd if on Error Resume NextNextEnd ifNextEnd Sub
8, finally, you can save the above script to the VBS format in the installation directory of the following side of the 1th picture below, so that the next use can be directly clicked on the next copy of the 2nd image of the red button pop-up local resources window, find the pre-saved VBS script file, open run can, as shown:
At this point, the entire PowerDesigner12 for the reverse modeling of Oracle Engineering is completed, I hope we can give you help, if there are errors, but also hope that the common progress; hand knocks tired convulsions, reproduced note source!
POWERDESIGNER12 Reverse Engineering Introduction