Entering content frame

Process documentation Database Mapping

Purpose

The abstract persistent schema of a container-managed entity bean or a set of interrelated container-managed entity beans is described in ejb-jar.xml. The mapping between this abstract persistence schema and the underlying database schema is stored in a J2EE Engine-specific deployment descriptor – persistent.xml. This Object/Relational mapping (O/R mapping) must fulfill a set of requirements to ensure the abstract schema works correctly.

This graphic is explained in the accompanying text

The O/R mapping described in persistent.xml applies to all container-managed entity beans in the abstract schema in the corresponding JAR.

Prerequisites

...

       1.      Structure linkThe database tables are created with the Java Dictionary

If you create your database tables first, when you specify the O/R mapping of your container-managed entity beans you can choose from the already created database tables and table columns to map the beans and their fields. The NetWeaver Developer Studio will then be able to verify the names of the database tables and columns.

       2.      Structure linkYour container-managed entity bean is created

       3.      Structure linkThe beans persistent fields are created

       4.      Structure linkThe bean’s relationships are created

Process Flow

You can use the NetWeaver Developer Studio to create your database tables, to create your container-managed entity beans and to specify the O/R mapping between them. The process of mapping your container-managed entity beans to the underlying database consists of:

·        Structure linkMapping your entity beans to database tables

·        Structure linkMapping persistent fields – this includes the mapping of persistent fields, dependent-value persistent fields, and compound primary keys

·        Structure linkMapping container-managed relationships

·        Structure linkVerifying the Object/Relational mapping

When creating the O/R mapping, you must observe a set of Structure linkO/R mapping rules. If you use the O/R mapping verification option, the system will check whether these rules are fulfilled.

You can also specify the name of the database that your application will use if your application contains database-specific queries. For more information, see Structure linkDatabase Types.

 

 

Leaving content frame