Skip Headers

# Using SEQUENCE Objects

Previous

Next

Your database administrator (DBA) must create a `SEQUENCE` object on the database for every sequencing series your application requires. If every class in your application requires its own sequence, the DBA creates a `SEQUENCE` object for every class; if you design several classes to share a sequence, the DBA need create only one `SEQUENCE` object for those classes.

For example, in Figure: Example of Database Tables–Racquet Information, consider the case of a sporting goods manufacturer that manufactures three styles of tennis racquet. The data for these styles of racquet are stored in the database as follows:

- Each style of racquet has its own class table.

- Each manufactured racquet is an object represented by a line in the class table.

- The system assigns serial numbers to the racquets that use sequencing.

Example of Database Tables–Racquet Information

Description of "Example of Database Tables–Racquet Information"

The manufacturer can do either of the following:

- Use separate sequencing for each racquet style. The DBA builds three separate `SEQUENCE` objects, perhaps called `ATTACK_SEQ`, `VOLLEY_SEQ`, and `PROX_SEQ`. Each different racquet line has its own serial number series, and there may be duplication of serial numbers between the lines (for example: all three styles may include a racquet with serial number 1234).

- Use a single sequencing series for all racquets. The DBA builds a single `SEQUENCE` object (perhaps called `RACQUET_SEQ`). The manufacturer assigns serial numbers to racquets as they are produced, without regard for the style of racquet.