FM/IMS and hierarchical databases

FM/IMS allows you to see the hierarchical relationship of segments in an IMS database and to see each segment and its connection to its parent and child segments. FM/IMS also allows you to interactively switch between viewing parent or child segments. For example, if you chose to view the PARTS, PURCHASE ORDER and DETAILS segments in the PARTS database, FM/IMS displays the PARTS segments and each of its child segments within the hierarchy:

Figure 1. PARTS occurrences with child segments

┌────────────────────────────────────────────────────────────────┐
│ Detail of Part 1 occurrence                                    │
└──┬─────────────────────────────────────────────────────────────┤
   │ Representation of Order 1 occurrence (child of Part 1)      │
   └──┬──────────────────────────────────────────────────────────┤
      │ Representation of Detail 1 occurrence (child of Order 1) │
      ├──────────────────────────────────────────────────────────┤
      │ Representation of Detail 2 occurrence (child of Order 1) │
   ┌──┴──────────────────────────────────────────────────────────┤
   │ Representation of Order 2 occurrence (child of Part 1)      │
   └──┬──────────────────────────────────────────────────────────┤
      │ Representation of Detail 3 occurrence (child of Order 2) │
┌─────┴──────────────────────────────────────────────────────────┤
│ Detail of Part 2 occurrence                                    │
└──┬─────────────────────────────────────────────────────────────┤
   │ Representation of Order 3 occurrence (child of Part 2)      │
   └──┬──────────────────────────────────────────────────────────┤
      │ Representation of Detail 4 occurrence (child of Order 3) │
   ┌──┴──────────────────────────────────────────────────────────┤
   │ Representation of Order 4 occurrence (child of Part 2)      │
   └──┬──────────────────────────────────────────────────────────┤
      │ Representation of Detail 5 occurrence (child of Order 4) │
      ├──────────────────────────────────────────────────────────┤
      │ Representation of Detail 6 occurrence (child of Order 4) │
      └──────────────────────────────────────────────────────────┘

With a simple command, you can switch to viewing the DETAILS segments, seeing each one in relationship to its parents:

Figure 2. DETAILS occurrences with parent segments


┌───────────────────────────────────────────────────────────┐
│ Representation of Part 1 occurrence                       │
└──┬────────────────────────────────────────────────────────┤
   │ Representation of Order 1 occurrence (child of Part 1) │
   └──┬─────────────────────────────────────────────────────┤
      │ Detail of Detail 1 occurrence (child of Order 1)    │
      ├─────────────────────────────────────────────────────┤
      │ Detail of Detail 2 occurrence (child of Order 1)    │
   ┌──┴─────────────────────────────────────────────────────┤
   │ Representation of Order 2 occurrence (child of Part 1) │
   └──┬─────────────────────────────────────────────────────┤
      │ Detail of Detail 3 occurrence (child of Order 2)    │
┌─────┴─────────────────────────────────────────────────────┤
│ Representation of Part 2 occurrence                       │
└──┬────────────────────────────────────────────────────────┤
   │ Representation of Order 3 occurrence (child of Part 2) │
   └──┬─────────────────────────────────────────────────────┤
      │ Detail of Detail 4 occurrence (child of Order 3)    │
   ┌──┴─────────────────────────────────────────────────────┤
   │ Representation of Order 4 occurrence (child of Part 2) │
   └──┬─────────────────────────────────────────────────────┤
      │ Detail of Detail 5 occurrence (child of Order 4)    │
      ├─────────────────────────────────────────────────────┤
      │ Detail of Detail 6 occurrence (child of Order 4)    │
      └─────────────────────────────────────────────────────┘