!--a11y-->
Database MappingThe 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.

The O/R mapping described in persistent.xml applies to all container-managed entity beans in the abstract schema in the corresponding JAR.
...
1.
The 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.
Your container-managed
entity bean is created
3.
The bean’s persistent
fields are created
4.
The
bean’s relationships are created
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:
·
Mapping your entity
beans to database tables
·
Mapping persistent
fields – this includes the mapping of persistent
fields, dependent-value persistent fields, and compound primary
keys
·
Mapping
container-managed relationships
·
Verifying the
Object/Relational mapping
When creating the O/R
mapping, you must observe a set of
O/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
Database
Types.
