Chapter 3 Creating J2EE Applications for Sybase EAServer
If you have an existing database, you can reverse engineer the database to create a Physical Data Model (PDM), generate an Object-Oriented Model (OOM) from the PDM and generate the default O/R mapping, then convert classes to EJBs.
For a new application, you can create a Class Diagram in an OOM, generate the PDM from the OOM and generate the default O/R mapping, then convert classes to EJBs.
If you already have a database schema and an Object Model but they do not match, you can manually define the O/R mapping, then convert classes to EJBs.
The following diagram shows an example of PDM:
The following diagram shows the OOM generated from the PDM:
The class and attribute names can be changed to respect Java naming conventions. When you rename classes, attributes, tables or columns, the O/R mapping is automatically updated if the O/R mapping is not user-defined.
Note: We recommend that you first create a package in the OOM, then define classes inside the package. The package is used to create the JAR and WAR files. Without a package, you may not be able to deploy EJBs into EAServer.
Copyright (C) 2005. Sybase Inc. All rights reserved. |
![]() |