When to use multiple data set groups

When you design database records, you design them to meet the processing requirements of many applications. You decide what segments will be in a database record and their hierarchical sequence within a database record.

These decisions are based on what works best for all of your application program's requirements. However, the way in which you arranged segments in a database record no doubt suits the processing requirements of some applications better than others. For example, look at the two database records shown in the following figure. Both of them contain the same segments, but the hierarchical sequence of segments is different.

Figure 1. Hierarchy of applications that need to access INSTR and LOC segments
Two similar database records. In the top record, COURSE is the root. Dependents of COURSE are, from left to right, INSTR, LOC, and STUDENT. Dependent of INSTR is REPORT. Dependent of STUDENT is GRADE. Bottom record: COURSE is the root. First dependent of COURSE is STUDENT. Dependent of STUDENT is GRADE.

The hierarchy on the top favors applications that need to access INSTR and LOC segments. The hierarchy on the bottom favors applications that need to access STUDENT and GRADE segments. (Favor, in this context, means that access to the segments is faster.) If the applications that access the INSTR and LOC segments are more important than the ones that access the STUDENT and GRADE segments, you can use the database record on the left. But if both applications are equally important, you can split the database record into different data set groups. This will give both types of applications good access to the segments each needs.

To split the database record, you would use two data set groups. As shown in the following figure, the first data set group contains the COURSE, INSTR, REPORT, and LOC segments. The second data set group contains the STUDENT and GRADE segments.

Figure 2. Database record split into two database groups
The first data set group contains the COURSE, INSTR, and LOC segments. The second data set group contains the STUDENT and GRADE segments.

Other uses of multiple data set groups include: