Skip Headers

# Understanding Sequencing in Relational Projects

Previous

Next

In an relational project, you store persistent objects for your application in database tables that represent the class of instantiated object. As Figure: Sequencing Elements in a Class Database Table shows, each row of the VEHICLE_POOL table represents an instantiated object from that class, and the VEH_ID column holds the primary key for each object.

Sequencing Elements in a Class Database Table

Description of "Sequencing Elements in a Class Database Table"

You configure TopLink sequencing at the project or session level (see "Configuring Sequencing at the Project Level" or "Configuring Sequencing at the Session Level") to tell TopLink how to obtain values for the primary key column: that is, what type of sequencing to use (see "Sequencing Types").

You configure TopLink sequencing at the descriptor level (see "Configuring Sequencing at the Descriptor Level") to tell TopLink into which table and column to write the sequence value when an instance of a descriptor's reference class is created.

Note: When choosing a column type for a primary key value, ensure that the type provides a suitable precision. For example, if you use a `TIMESTAMP` type but your database platform's `TIMESTAMP` is defined only to the second, then identical values may be returned for objects created within the same second.

This section describes the following:

- Sequencing Configuration Options

- Sequencing Types

- Sequencing and Preallocation Size

- Sequencing With Entity Beans WIth Container-Managed Persistence