Electronic journal schema

The electronic journal schema is the set of tables used by the journal service object to work within a particular configuration (entities and number of generations). The journal service object references all the tables for a schema in the database by prefixing the table names with the name of the schema.

The journal schema consists of a control table and a number of journal tables calculated with the following formula:

number of schema tables = (number of entities) x (number of generations)

The organization of the journal schema is detailed below. This information is for developers who are developing utilities to exploit journal data through a Java(TM) application or data access beans.

The name of the control table is schemaName.DSEJOUCT. It contains an entry for each defined entity (ENTITY_NAME column), with information about the last journal date (LAST_DATE column) and the last wrap number (WRAP_N column). There is also a special entry (with ENTITY_NAME set to the specific value of DSEJOU) with information about the total number of generations to be kept for each entity. If journal services in multiple JVMs access the same journal tables (using application server clones for load balancing), the control table has an extra field called RECORD_NBR to identify the last record added to the tables.

Each entity has a journal table for each generation in the specified schema, with the name entityName_n, where "n" is a number from 1 to the total number of generations defined in the control table.

The structure of the journal tables is defined at schema creation time, and is provided as an argument to the schema generator method (see Schema Generator). There is always an extra column in the journal tables, called DSERECN, which holds the record numbers and acts as the primary key for accessing the journal tables. The other columns are specified at creation time by passing the column definitions, using the same format required by the standard SQL CREATE TABLE statement. The allowed column types are the ones that are allowed by JDBC support (refer to the JDBC API documentation or JDBC types mapped to Java types.