Skip Headers

# Understanding Relational Mappings

Previous

Next

A relational mapping transforms any object data member type to a corresponding relational database (SQL) data source representation in any supported relational database. Relational mappings let you map an object model into a relational data model.

Relational mappings transform object data members to relational database fields. Use them to map simple data types including primitives (such as `int`), JDK classes (such as `String`), and large object (LOB) values. You can also use them to transform object data members that reference other domain objects by way of association where data source representations require object identity maintenance (such as sequencing and back references) and possess various types of multiplicity and navigability. The appropriate mapping class is chosen primarily by the cardinality of the relationship.

Do not confuse relational mappings with object-relational mappings (see "Understanding Object-Relational Mappings"). An object-relational mapping transforms certain object data member types to structured data source representations optimized for storage in specialized object-relational databases such as Oracle9i Database Server. Object-relational mappings let you map an object model into an object-relational data model. In general, you can use relational mappings with any supported relational database. You can only use object-relational mappings with specialized object-relational databases optimized to support object-relational data source representations.

This chapter describes the following:

- Relational Mapping Types

- Relational Mapping Concepts