A complex network is also a collection of records and relationships, but the relationships are many-tomany
instead of one-to-many. The relationship between students and classes is a complex network. An
occurrence of this relationship can be seen in Figure H-16, and the general schematic is in Figure H-17.
We saw earlier that we can use linked lists and indexes to process records in orders different from the
one in which they are physically stored. We can also use those same data structures to store and process
the relationships among records.
How Can We Represent Trees?
We can use sequential lists, linked lists, and indexes to represent trees. When using sequential lists, we
duplicate many data; and furthermore, sequential lists are not used by DBMS products to represent
trees. Therefore, we describe only linked lists and indexes.
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 subsequent
records, as illustrated. Note that these records are not stored in any particular order and that
they do not need to be.