This table provides a list of valid country postal zones which can be selected by web site users. This information is static and doesn't need a data entry page.
Source romber_country_postal_zones_tbl.sql
create table romber_location.country_postal_zones ( country_id romber_location.location_id not null, country_postal_zone_code romber_base.generic_code not null, country_postal_zone_id romber_location.location_id not null );
Source romber_country_postal_zones_pk.sql
alter table romber_location.country_postal_zones add constraint romber_country_postal_zones_pk primary key ( country_postal_zone_id );
Source romber_country_postal_zones_uk1.sql
alter table romber_location.country_postal_zones add constraint romber_country_postal_zones_uk1 unique ( country_id, country_postal_zone_code );
Source romber_country_postal_zones_fk1.sql
alter table romber_location.country_postal_zones add constraint romber_country_postal_zones_fk1 foreign key ( country_postal_zone_id ) references romber_location.locations ( location_id );
Source romber_country_postal_zones_fk2.sql
alter table romber_location.country_postal_zones add constraint romber_country_postal_zones_fk2 foreign key ( country_id ) references romber_location.countries ( country_id );
Source romber_country_postal_zones_load.sql
insert into romber_location.country_postal_zones ( country_id, country_postal_zone_code, country_postal_zone_id ) values ( 0, '', 0 );