POSC Specifications: Epicentre Version 3.0 | Logical Data Model |
This modification replaces the text form of postal codes with a validated set of postal codes.
CHANGE ESM_ref_postal_code ALTER ENTITY mailing_address; ALTER postal_code ALTER TYPE AS ref_postal_code (*<verb>be defined using*) ; END_ENTITY; ADD ENTITY ref_postal_code (*<population>LOCAL*) (*<desc> A standard code defined within a nation to facilitate the delivery of mail.*) SUBTYPE OF (ref_aliasable_data); country : geopolitical_feature (*<desc>This is the country in which the postal code exists.*) (*<verb>be defined within*); identifier : ndt_identifier (*<DESC>The name or identifier of the code.*); INVERSE mailing_address : SET[0:?] of mailing_address FOR postal_code (*<desc>These are the mailing addresses that use this postal code.*) (*<verb>be used to define*); UNIQUE si: identifier, country; WHERE val1: country.ref_geopolitical_area.identifier='country' (*<desc>A postal code is defined within a country.*); END_ENTITY; ALTER ENTITY geopolitical_feature; INVERSE ADD postal_code : SET[0:?] of ref_postal_code FOR country (*<desc>These are the postal codes defined for this geopolitical feature when this geopolitical feature is a country. Note: This inverse only applies to countries.*) (*<verb>define*); END_ENTITY; END_CHANGE;