Linked-List Representation of Trees
Figure H-18 shows a tree structure in which the VENDOR records are parents and the INVOICE records are children. Figure H-19 shows two occurrences of this structure, and all of the VENDOR and INVOICE records have been written to a direct access file in Figure H-20. VENDOR AA is in relative record number 1 (RRN1), and VENDOR BB is in relative record number 2. The INVOICE records have been stored in sub-sequent records, as illustrated. Note that these records are not stored in any particular order and that they do not need to be.