HOSPITAL‑CLAIM (unique key CLAIM‑DATE‑0430, PATIENT‑NAME‑0430 within the COVERAGE‑CLAIMS set relationship)
COVERAGE‑CLAIMS (owner COVERAGE, unique key, SELECTION‑DATE‑0400 (made up of Year, Month and Day) combined with TYPE‑0400
The table below identifies the primary path and unique keys that define unique occurrences of the HOSPITAL-CLAIM record:
|
Record |
Unique Key |
Set Relationship |
|
EMPLOYEE |
EMP‑ID‑0415 |
Owns COVERAGE via EMP‑COVERAGE set |
|
COVERAGE |
SELECTION‑DATE‑0400, TYPE‑0400 within EMP-COVERAGE set relationship |
Owns HOSPITAL-CLAIM via COVERAGE‑CLAIMS set |
|
HOSPITAL-CLAIM |
CLAIM‑DATE‑0430, PATIENT‑NAME‑0430 within the COVERAGE‑CLAIMS set relationship |
|
EMP‑ID‑0415, SELECTION‑DATE‑0400, TYPE‑040
The owner of the COVERAGE‑CLAIMS set is COVERAGE, which you access via the EMP‑COVERAGE set relationship. The unique key for COVERAGE is SELECTION‑DATE‑0400 (day, month, year) and TYPE‑0400. This combination of fields uniquely defines an occurrence of the COVERAGE record within the EMP‑COVERAGE relationship. To refine the unique key, you must select the EMPLOYEE record type, which owns the COVERAGE record via the EMP-COVERAGE set. The unique key for EMPLOYEE is EMP‑ID‑0415. Therefore, the foreign key for the COVERAGE‑CLAIMS relationship becomes the EMP‑ID‑0415, SELECTION‑DATE‑0400, and TYPE‑0400.
To define the table procedure specification
No auxiliary records exist because the target record does not participate in any other set relationships
Instead of making the HOSPITAL-CLAIM record the target, you can also add a table procedure for the COVERAGE record type. By making COVERAGE the target, you can perform INSERT processing, setting up the foreign keys required to relate the COVERAGE table to the EMPLOYEE table.
If you select COVERAGE to be the target record, then the developer of the COVERAGE table would have to make code changes to the table procedure to support the HOSPITAL-CLAIM record type. At first this may seem an odd way to retrieve the data. But from a table standpoint, this view may be more realistic. The COVERAGE record type can be combined with the HOSPITAL‑CLAIM type to form a single view of the two independent tables.
Remember that the COVERAGE-CLAIMS relationship is a multi-member set. You can combine all three member records with the owner into one complete table. To do this, the developer would have to add code into the table procedure to include all of the appropriate fields. The developer would also have to add code to determine what record type to access and how to update and insert records.
|
Copyright © 2013 CA.
All rights reserved.
|
|