Previous Topic: Sample 3: Target Record with No Unique KeyNext Topic: Sample SQL Statements


Sample 4: Target Record Part of a Bill-of-Materials Relationship

Target Record

STRUCTURE (no unique key)

Set Relationships

REPORTS-TO (owner EMPLOYEE)
MANAGES (owner EMPLOYEE)

Path

EMPLOYEE, STRUCTURE

Analysis

Choose EMPLOYEE as the entry record with EMP-ID-0415 as the unique key. Select the MANAGES set relationship for the primary path, making the REPORTS-TO set relationship an auxiliary record.

The only twist here is that the unique keys for both relationships are the same field (EMP-ID-0415) and record type (EMPLOYEE). To avoid problems, you must change the SQL column name that Quick Bridge assigns. For example, you could type MANAGER for the SQL Column Name of the EMP‑ID‑0415 field in the Entry Record tab and SUBORDINATE in the SQL column name for the same field in the Auxiliary Record tab.

To define the table procedure specification

  1. In the Entry Record tab, select Employee and EMP-ID-0415 as the unique key field. Change the SQL column name to something like MANAGER. Click Next.
  2. In the Path Record tab, select the STRUCTURE record and the MANAGES set relationship. Click Target.
  3. In the Aux Record tab, select EMP-ID-0415 as the unique field for the EMPLOYEE record in the REPORTS-TO set relationship. Change the SQL column name to something like SUBORDINATE.
  4. In the Target Fields tab, select the appropriate columns and then save and generate the table procedure.