Inverting a parent-child relationship

Another type of conflict that logical relationships can resolve occurs when a segment's parent in one application program acts as that segment's child in another application program.

The following figure shows the hierarchies for each of these application programs.

Figure 1. Supplies and purchasing hierarchies
Begin figure description. Program B Supplies Database has root segment of Item and dependent segment of Vendor. Program C Purchasing Database has root segment of Vendor and dependent segment of Item. End figure description.

Logical relationships can solve this problem by using pointers. Using pointers in this example would mean that the ITEM segment in the purchasing database would contain a pointer to the actual data stored in the ITEM segment in the supplies database. The VENDOR segment, however, would actually be stored in the purchasing database. The VENDOR segment in the supplies database would point to the VENDOR segment that is stored in the purchasing database.

The following figure shows the hierarchies of these two programs.

Figure 2. Program B and program C hierarchies
Begin figure description. Program B Supplies Database has root segment of Item and dependent segment of Vendor. Program C Purchasing Database has root segment of Vendor and dependent segment of Item. Arrows run from dependent B to C and C to B. End figure description.

If you did not use logical relationships in this situation, you would: