Chapter 7 Generating JDO Persistent Objects


Defining Classes and Database Schema

If you have an existing database, you can reverse engineer the database and create a PDM, then generate an Object-Oriented Model (OOM) from the PDM. PowerDesigner will generate the default O/R mapping.

For a new application, you can create a Class Diagram in an OOM, then generate the PDM from the OOM. PowerDesigner will generate the default O/R mapping.

If you already have a database schema and an OOM but they do not match, you can manually define the O/R mapping.

For more information on O/R mapping, see the core PowerDesigner documentation.

The following diagram shows an example of a PDM.


The following diagram shows the generated OOM from the PDM. The name of the classes and their attributes can be modified to respect Java naming conventions.


 


Copyright (C) 2008. Sybase Inc. All rights reserved.