1. Open powerdesigner--file--reverse engineer--database
2. Select the database version you want to connect to, using Oracle version 11g.
3. Click the red area to select the data source
4. Select Modify
5. Fill in your database name, connection address, user name here. Are you sure
6. Select your newly created connection database
7. Fill in the user name and password for the database that needs to be converted to the model
8. OK to export as a model
9. If a table or field is commented on in the database, you can make these comments reflected on the physical model and easier to understand when you view the PDM diagram by doing the following.
Select tool--execute Commands--edit/run Script
10. Paste the code from the 11 steps here, and then execute. The comment is added successfully
11. scripting language to be executed (no modification required)
Option Explicitvalidationmode=Trueinteractivemode=im_batch Dim MDL' The current model ' get the current active modelset mdl =Activemodelif (MDL is nothing) Thenmsgbox"There is no current Model"ElseIf not MDL. 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 Sub ProcessFolder (folder) Dim Tab' Running table forEach Tab in Folder.tablesifNot Tab.isshortcut ThenifLen (tab.comment) <> 0Thentab.name=Tab.commentendifOn Error Resume Nextdim Col' Running column forEach col in Tab.columnsifLen (col.comment) <>0Thencol.name=Col.commentendifOn Error Resume nextnextendifNextEnd Sub
Power Designer Reverse Engineering imports Oracle tables into models annotated