Home page  
Help >
Hierarchies and Some Definitions
Version 7.11
Hierarchies and Some Definitions

Suppose we do the following sequence of commands:

FIND A WHERE STATUS=OK
MATCH A CUSTOMERS THRU CUST# WITH SALES
RELATE A CUSTOMERS SALES OVER CUST# PRESENT BY NAME

The FIND has isolated some customer records who met some criteria, the MATCH gets the sales records that belong to those customers. The RELATE joins this isolation into the following one-to-many arrangement

   Table        Hierarchy        Name            Description
   Names          Level
   CUSTOMERS        1            DANDY, JIM
   SALES            2                            RING
   SALES            2                            SPATS
   SALES            2                            GOLF CLUBS
   SALES            2                            WALKING STICK
   SALES            2                            JEWELRY
   SALES            2                            SHIRT
   SALES            2                            SPATS
   SALES            2                            CUFF LINKS
   SALES            2                            ROSES
   CUSTOMERS        1            MARVEL, CAPTAIN
   SALES            2                            GOLF CLUBS
   SALES            2                            RED SUIT
   SALES            2                            RED SUIT
   SALES            2                            RED SUIT
   CUSTOMERS        1            SMITH, BOB
   SALES            2                            CLOCK
   SALES            2                            AUTOMOBILE
   SALES            2                            JET PLANE
   SALES            2                            CAMPER TRUCK
   CUSTOMERS        1            STRONG, BARBARA
   SALES            2                            WEIGHTS
   SALES            2                            DRESS
   SALES            2                            TENNIS RACKET
   CUSTOMERS        1            WHITE, PERRY
   SALES            2                            BOOZE
   SALES            2                            WINE
   SALES            2                            WINE
   SALES            2                            WINE
   SALES            2                            GOLF CLUBS
   CUSTOMERS        1            WOMAN, WONDER
   SALES            2                            DRESS
   SALES            2                            CLOCK
   SALES            2                            DRESS
   SALES            2                            GOLDEN ROPE
   SALES            2                            DRESS
   SALES            2                            MAKE UP
   SALES            2                            DRESS
   SALES            2                            JEWELRY
   SALES            2                            AUTOMOBILE

This is a two level hierarchy with CUSTOMERS records at level 1, and the SALES records at level 2.

We could have displayed any field from the data records, but chose to display just NAME from the CUSTOMERS record and the DESCR field from the SALES record. To reinforce the nature of this hierarchy we also show the Table names from which the data came, and the Hierarchy Level .

The Package of Information is from one level 1 record to the next level 1 record.

The packages were formed by the "CUSTOMERS SALES OVER CUST#" part of the RELATE command, then they were rearranged into name order by the "PRESENT BY NAME" clause. The above illustrates and defines what we mean by Hierarchy Level and Package of Information. These two concepts are used elsewhere in this documentation, so it is important that you know what they are.

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.