Previous Topic: Disconnecting Records from a SetNext Topic: Storing a Bill-of-Materials Structure


Accessing Bill-of-Materials Structures

A bill-of-materials structure is a relationship between record occurrences of the same type. This structure is derived from the manufacturing environment where it is used to demonstrate relationships between parts: a part can be a component of another part and a part can contain other parts as its components.

This structure is typically represented as a many-to-many relationship (that is, by using two sets and a junction record).

Example of a Bill-of-Materials Structure

In the EMPLOYEE database, a bill-of-materials structure signifies relationships between managers and subordinates: an employee can manage other employees through the MANAGES set, and can also be managed by other employees through the REPORTS-TO set.

The figure below shows this bill-of-materials structure. The STRUCTURE record serves as the junction record between employees and their managers. Note that one set is defined with the automatic set membership option and the other is defined with the manual set membership option.

    ┌──────────────────────────────┐
    │ EMPLOYEE                     │
    ├─────┬─────┬──────┬───────────┤
    │ 415 │ F   │ 116  │ CALC      │
    ├─────┴─────┴──────┴─────┬─────┤
    │ EMP-ID-0415            │ DN  │
    ├────────────────────────┴─────┤
    │ EMP-DEMO-REGION              │
    └───────────┬──────┬───────────┘
                │      │
REPORTS-TO      │      │      MANAGES
NPO OM NEXT     │      │      NPO MA NEXT
                │      │
                │      │
    ┌───────────▼──────▼───────────┐
    │ STRUCTURE                    │
    ├─────┬─────┬──────┬───────────┤
    │ 440 │ F   │ 3    │ VIA       │
    ├─────┴─────┴──────┴─────┬─────┤
    │ MANAGES                │     │
    ├────────────────────────┴─────┤
    │ EMP-DEMO-REGION              │
    └──────────────────────────────┘