# Preparing for Reverse Generation

Before performing reverse generation, you usually perform the following tasks:

1. Create a UML diagram.

2. Define your database tables (and views, synonyms, and snapshots) based on the entities, associations, and attributes in the UML diagram. If you have existing legacy tables, you may want to structure them so there is one entity per table, if possible.

3. Decide if you will create default entity objects and associations, define them individually, or a combination of the two. Create custom domains, if needed.

   Because the database data types are in SQL and the business logic tier types are in Java, Business Components for Java needs to translate between the two:

   - If you let a wizard generate default entity objects, it uses the predefined data type mappings. For Oracle Object Types and types that do not have predefined mappings, it attempts to create a domain for the type. You can change the data type after reverse generation, if needed.

   - If you create an entity object by using the Entity Object Wizard, you can specify what data types and domains to map to your database columns before reverse generation. You can optionally create custom domains for certain column types.

After completing these steps, you are ready to create entity objects and associations from the tables.

You can optionally effect the behavior of many business components by customizing framework base classes, which you might want to start before generating business components.

Related topics
Using a Domain as a Data Type for an Attribute
Ways to Represent Oracle Object Types in Entity Objects
Coordinating Entity Objects and Database Triggers
About the Development Process
About Generating Entity Objects, Associations, and Database Tables
About Reverse Generation
What Is an Entity Object?
What Is an Entity Attribute?
Business Component Data Types