Oracle SQL Developer Data Modeling database re-engineering with APEX features

Von Tobias Arnhold 10.13.2008
I tried a bit around with the new Oracle SQL Developer Data Modeling. First I tried to get it to run on my USB stick without the included JRE.
After it started I used some APEX features to re-engineer a database model.

How to (tested on Windows XP):
1. Download the software and extract/install it
OSDM:
Download from: Oracle_Download_Page
If you use the usb stick copy it to: %YOUR_USB_DRIVE%\PortableApps\ORACLE\oracle_data_modeller

PStart (if you want to use your OSDM from an USB stick in a comfortable way)
Download from pegtop.net

2. Get the new OSDM to run

Either you start it from your standard installation, for example
C:\ORACLE\ADMINISTRATION\oracle_data_modeller\bin\osdm.exe

Or you create an own batch if you want to use it from an USB stick
REM Start osdm with nojre installed
REM (standalone from USB stick)


REM 1. set variables
REM 1.1 Path Variable
REM set PATH=\PortableApps\ORACLE\INSTANT_CLIENT;%PATH%

REM 1.2 ORACLE_HOME variable
REM set ORACLE_HOME=\PortableApps\ORACLE\INSTANT_CLIENT

REM 1.3 JAVA variable
set PATH=\PortableApps\RUNTIME\JRE\bin;%PATH%
set JAVA_HOME=\PortableApps\RUNTIME\JRE\bin

REM 1.4 TNS_ADMIN variable
REM set TNS_ADMIN=\PortableApps\ORACLE\INSTANT_CLIENT

REM 1.5 NLS_LANG Variable
REM set NLS_LANG=German_Germany.WE8MSWIN1252

REM 2. Connect app path
cd \PortableApps\ORACLE\oracle_data_modeller\bin

REM 3 Import java files into path variable
set cwdcp=..\conf
set cwdcp=%cwdcp%;..\lib\osdm.images.jar
set cwdcp=%cwdcp%;..\lib\osdm.exports.jar
REM this string you need to add
REM if you create it from the Linux script

set cwdcp=%cwdcp%;..\lib\osdm.imports.jar
set cwdcp=%cwdcp%;..\lib\osdm.sets.jar
set cwdcp=%cwdcp%;..\lib\osdm.model.jar
set cwdcp=%cwdcp%;..\lib\osdm.gui.jar
set cwdcp=%cwdcp%;..\lib\osdm.utils.jar
set cwdcp=%cwdcp%;..\lib\log4j.jar
set cwdcp=%cwdcp%;..\lib\lf\jlfgr.jar
set cwdcp=%cwdcp%;..\lib\poi\poi.jar
set cwdcp=%cwdcp%;..\lib\jimi\JimiProClasses.jar
set cwdcp=%cwdcp%;..\lib\jdbc\oracle\ojdbc5.jar
set cwdcp=%cwdcp%;..\lib\oracleaw\awxml.jar
set cwdcp=%cwdcp%;..\lib\oracleaw\olap_api.jar
set cwdcp=%cwdcp%;..\lib\oracleaw\xmlparserv2.jar
set cwdcp=%cwdcp%;..\lib\ohj\help4.jar
set cwdcp=%cwdcp%;..\lib\ohj\ohj-jewt.jar
set cwdcp=%cwdcp%;..\lib\ohj\oracle_ice.jar

REM 4. start application
java -Xmx1024M -Xms258M -classpath %cwdcp% oracle.dbtools.crest.swingui.ApplicationView

3. Create DDL with APEX

Go Home > Utilities > Generate DDL
Select your schema
Under "Object Type" click on "Check all" and Output to "Save As Script File"
Now click "Generate DDL" and give it a name like NEW_DDL_SCRIPT

Download your generated script: Home > SQL Workshop > SQL Scripts > Script Editor
Click on your script and download it as "NEW_DDL_SCRIPT.sql".

4. Integrate DDL
Start the OSDM (via batch or the osdm.exe)
File > Import > DDL File


Select your APEX generated DDL file
Select your database version, for example: Oracle Database 10g
Import runs and log-file will be generated

Oracle SQL Developer Data Modeling Version: 1.5.1 Build: 518

Data Modeling Import Log
Date and Time: 2008-10-13 15:50:26
Design Name: test
RDBMS: Oracle Database 10g

All Statements: 75
Imported Statements: 75
Failed Statements: 0
Not Recognized Statements: 0

The generated model looked really well and I can only hope that this tool will be free at the end of the development.