Previous Topic: Segmenting by Groups of EntitiesNext Topic: Data Compression


Segmenting by Logical Key

Segmenting by logical key is used to separate a large non-SQL-defined database into identical segments based on the value of one or more data elements. For example, you might separate employee data by company code, each company within Commonweather Corporation having its own segment of the database.

Note: The key field on which the segmentation is performed may or may not actually exist as a data element in some entity of the database.

Segmenting by key value in a non-SQL implementation

To segment by key value in a non-SQL implementation:

  1. Define a single schema that describes the database.
  2. Define a set of subschemas associated with the schema.
  3. Define a segment for each physical implementation of the database. Each segment must contain the same named set of areas. Use separate page ranges or page groups to distinguish each segment.
  4. If necessary, define a database name for each segment, including the corresponding segment and additional segments for other data accessed by the application.
  5. Provide a mechanism to direct each application program to the correct segment by specifying the DBNAME or segment name on its BIND RUNUNIT statement.

Segmenting by key value in an SQL implementation

To segment by key value in an SQL implementation:

  1. Define a segment for each logical division of the database. Each segment must contain the same named set of areas.
  2. Define a schema for each logical division. Each schema will describe tables in one of the segments.
  3. Define the identical set of tables in each schema.
  4. For each application, create a set of access modules, one for each schema.
  5. Provide a mechanism to direct processing to the correct access module at runtime.

Database Implementation by Key Value

Database implementation by key value.

Advantages

A database implementation by key value is advantageous because it:

Considerations

While a database that is implemented by key value facilitates certain processing functions, it complicates simultaneous processing of all segments.

In an SQL environment, you could create a view of all the tables at once to access all segments at one time.

In a non-SQL environment, you would have to bind concurrent run units to access all segments at one time. An alternative is to bind rununits serially.