You are here: Commands > Relations > Parent and Related Tables

Parent and Related Tables

Data relationships created with the Relations command are hierarchical. The primary table is called the parent table and the dependent tables are called related or child tables. A parent can have many child tables. Child tables can be parents, too, with child tables of their own. A parent table can also be related to itself. A grandchild relation has to be created from the parent.

You begin a relationship by opening a parent table in the View. The parent table does not have to be sorted or indexed. Once a relationship is established, you can add fields from the child table to the View or access them in other ways for analysis. The related fields can be Viewed only in the parent table.

Analyzer lets you name each relationship individually. This lets you establish more than one relationship between a parent table and a related table and lets you relate a parent table to itself.

An originating Analyzer parent table can actively reference information from any number of related tables. An Analyzer Project can have many originating parent tables. Analyzer stores all relationships and related fields until you delete them.

There is a many-to-one relationship between a parent and a child table. The parent table can have duplicate or missing records in the key field. A child table should not have duplicate or missing records in the key field.

Analyzer compares the two tables according to the contents of the key field, record by record. The contents of the key field in each table must be identical to obtain a match. When the data in the key field is identical, Analyzer can relate or virtually join, the record data in the child table to the corresponding record in the parent table.

When there are duplicate records in the key field of the child table, Analyzer matches to the first occurrence of the key. Remaining duplicate keys are ignored. When there is no matching key in the related table, Analyzer displays a blank for character and date fields, zeros for numeric fields and “F” for logical fields.