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 inventory program, Program B, needs to process information about medications using the medication as the root segment.
- A purchasing application program, Program C, processes information about which vendors have sold which medications. Program C needs to process this information using the vendor as the root segment.
The following figure shows the hierarchies for each of these application programs.

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.

If you did not use logical relationships in this situation, you would:
- Keep the same data in both paths, which means that you would be keeping redundant data.
- Have the same disadvantages as separate files of data:
- You would need to update multiple segments each time one piece of data changed.
- You would need more storage.