Choosing Physical Tuning Options › Placement of Entities in Areas › Segmentation of Databases › Segmenting by Logical Key
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:
- Define a single schema that describes the database.
- Define a set of subschemas associated with the schema.
- 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.
- If necessary, define a database name for each segment, including the corresponding segment and additional segments for other data accessed by the application.
- 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:
- Define a segment for each logical division of the database. Each segment must contain the same named set of areas.
- Define a schema for each logical division. Each schema will describe tables in one of the segments.
- Define the identical set of tables in each schema.
- For each application, create a set of access modules, one for each schema.
- Provide a mechanism to direct processing to the correct access module at runtime.
Database Implementation by Key Value
Advantages
A database implementation by key value is advantageous because it:
- Simplifies recovery operations by permitting certain application programs to remain active while parts of the database are being recovered or updated.
- Facilitates and shortens unload/load operations.
- Allows for distribution of an organization's processing to multiple machines and sites.
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.
Copyright © 2014 CA.
All rights reserved.
|
|