Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
After you have designed the table, you may need to generate files to save it, which is not particularly friendly if you use SQL statements, and you will usually use PowerDesigner files to manage it. This article will take you through the process of generating ORACLE data models in reverse using PowerDesigner.
1. Environmental
Environment Description:
- Windows7, Oracle11R2 32-bit.
- PowerDesigner16.5
2. Connect the ORACLE database
Open PowerDesigner and create a new physical data model.
From the menu bar click Database –Configure Connections…” Options. On the Configure Data Connections configuration screen that is displayed, select the Connection Profiles TAB.
Click the “Add Data Source” button in the toolbar to Add a Data Source. In the Connection Profile Definition window that is displayed, enter the database Connection information.
driver class:oracle.jdbc.driver.OracleDriver
url:jdbc:oracle:thin: @ 192.168.50.23:1521:orcl
Copy the code
Click “Test Connection…” in the lower left corner. Button test connection;
If could not Initialize Javavm is displayed, you need to replace the 32-bit JDK, install the 32-bit JDK in a random path and add start.bat to the powerDesigner directory.
Set JAVA_HOME=D:\jdk8-32# JDK pathSetCLASSPATH = D:\PowerDesigner\ojdbc8.jar # PdShell16.exe #.exe file nameCopy the code
3. Model generation
Select File — Reverse Engineer — Database from the menu bar to Reverse generate the physical data model. Keep the default and click ok.
On the Database Reverse Engineering Options page, select Using a data source.
Click the button on the right to pop up the Data Source selection interface.
Check Connection Profiles, select the orcl.dcp you just created and data username and password below, click the Connect button to return. Continue clicking ok.
After confirmation, you can enter the interface for selecting the most critical users, tables, views and other contents. Please check the corresponding contents according to actual needs, and finally click ok button for the reverse generation of physical data model.
You get the model.