Example logical relationships

This relationship diagram shows how the logical relationships for the Suburb segment with a key of FREMANTLE are extracted.

Figure 1. Logical relationships for DJ2E database

    DJ3E                   DJ2E                   DJ1E

 ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┐       ┌─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
│                      (2)↓       ↓(4)                      │
  ┌─────────┐            ┌─────────┐            ┌─────────┐
│ │ STREET  │◄ ─ ─ ┐     │ SUBURB  │     ┌ ─ ─ ►│ SHIRE   │ │
  └────┬────┘            └────┬────┘            └────┬────┘
│      │           │          │          │           │      │
       │               ┌──────┴──────┐               │
│      │        (1)│   │             │   │(3)        │      │
  ┌────┴────┐     ┌────┴────┐   ┌────┴────┐     ┌────┴────┐
└─│ INSUB   │     │ LINKSTR │   │ INSHIRE │     │ LINKSUB │─┘
  └─────────┘     └─────────┘   └─────────┘     └─────────┘

Normally in the extract process, logical relationships are chased after all the database records in the primary database have been processed. In the following example, we are only extracting the Suburb FREMANTLE and all its dependents. The Relationship criteria on the previous page is used.

Firstly the root segment for Suburb FREMANTLE is selected and the LINKSTR and INSHIRE segments are written to the extract file.

For the logical relationship between INSHIRE and SHIRE we are only chasing one segment, hence the Shire of FREMANTLE is chased. This means:

  1. The SHIRE root segment for FREMANTLE and all its dependents are written to the extract file.
  2. The first logical relationship between LINKSUB and SUBURB is chased. This LINKSUB segment has a logical parent of BEACONSFIELD. This SUBURB segment has not previously been extracted so the database record for BEACONSFIELD is extracted.
  3. For the logical relationship between INSHIRE and SHIRE for BEACONSFIELD we are only chasing one segment, hence the Shire of FREMANTLE is chased. The SHIRE segment for FREMANTLE has already been extracted, so no further chasing is required.

For the logical relationship between LINKSTR and STREET for BEACONSFIELD we are only chasing two segments, hence the Streets of AGNES ST and ANNIE ST (the first two streets in Beaconsfield, according to alphabetic order) are chased.

  1. The STREET root segment of AGNES ST and all its dependents are written to the extract file.
  2. The first logical Relationship between INSUB and SUBURB is chased. This LINKSUB segment has a logical parent of BEACONSFIELD, this has been extracted so no further chasing is required for AGNES ST.
  3. The STREET root segment of ANNIE ST and all its dependents are written to the extract file.
  4. The first logical Relationship between INSUB and SUBURB is chased. This LINKSUB segment has a logical parent of BEACONSFIELD. This database record has been extracted so no further chasing is required for ANNIE ST.

The logical relationships have all been chased for the INSHIRE and SHIRE segments that have a key value of FREMANTLE.

After the chasing for the INSHIRE logical relationship has completed, the logical relationship between LINKSTR and STREET is chased. For this relationship FM/IMS chases the first two occurrences of the LINKSTR segment. This means the following streets are processed:

  • ADELAIDE ST
  • ALMA ST

For ADELAIDE ST the following processing takes place:

  1. The STREET root segment of ADELAIDE ST and all its dependents are written to the extract file.
  2. The first logical Relationship between INSUB and SUBURB is chased. This LINKSUB segment has a logical parent of ESPERANCE. This DJ2E database record hasn't been processed so it is written to the extract file.
  3. For the logical relationship between INSHIRE and SHIRE where the key is ESPERANCE only one occurrence is chased. Hence the SHIRE segment with a key of ESPERANCE is chased. This hasn't been processed so the DJ1E database record is extracted.
  4. For the logical relationship between LINKSUB and SUBURB where the key is ESPERANCE only one occurrence is chased. Hence the SUBURB segment with a key of CASCADE is chased. This hasn't been processed so the DJ2E database record is extracted.
  5. For the logical relationship between INSHIRE and SHIRE where the key is CASCADE only one occurrence is chased. Hence the SHIRE segment with a key of ESPERANCE is chased. This has been processed so the DJ1E database record is not extracted.
  6. For the logical relationship between LINKSTR and STREET for the SUBURB of CASCADE only one occurrence is chased. Hence the STREET segment with a key of ASHA CT is chased. This hasn't been processed so the DJ3E database record is extracted.
  7. The first logical Relationship between INSUB and SUBURB is chased. This LINKSUB segment has a logical parent of ESPERANCE. This has been processed so the DJ2E database record is not extracted.
  8. For the logical relationship between LINKSTR and STREET for the SUBURB with a key of ESPERANCE only one occurrence is chased. Hence the STREET segment with a key of ADDINGTON CRO is chased. This hasn't been processed so the DJ3E database record is extracted.
  9. The first logical Relationship between INSUB and SUBURB is chased. This LINKSUB segment has a logical parent of ESPERANCE. This has been processed so the DJ2E database record is not extracted.

Extract processing continues chasing logical relationships for SUBURB of FREMANTLE. For ALMA ST the following processing takes place:

  1. The STREET root segment of ALMA ST and all its dependents are written to the extract file.
  2. The first logical Relationship between INSUB and SUBURB is chased. This LINKSUB segment has a logical parent of FREMANTLE. This DJ2E database record has been processed so it is not written to the extract file.
  3. Since there are no more logical relationships to chase, the extract process is terminated.

Related topics