This table provides a list of telephone area codes. This information is dynamic and does need a data entry page.
Source romber_telephone_area_codes_tbl.sql
create table romber_telecomm.telephone_area_codes ( country_id romber_location.location_id not null, telephone_area_code romber_base.generic_code not null, telephone_area_id romber_telecomm.address_id not null );
Source romber_telephone_area_codes_pk.sql
alter table romber_telecomm.telephone_area_codes add constraint romber_telephone_area_codes_pk primary key ( telephone_area_id );
Source romber_telephone_area_codes_uk1.sql
alter table romber_telecomm.telephone_area_codes add constraint romber_telephone_area_codes_uk1 unique ( country_id, telephone_area_code );
Source romber_telephone_area_codes_fk1.sql
alter table romber_telecomm.telephone_area_codes add constraint romber_telephone_area_codes_fk1 foreign key ( telephone_area_id ) references romber_telecomm.addresses ( telecomm_address_id );
Source romber_telephone_area_codes_fk2.sql
alter table romber_telecomm.telephone_area_codes add constraint romber_telephone_area_codes_fk2 foreign key ( country_id ) references romber_location.countries ( country_id );
Source romber_telephone_area_codes_load.sql
insert into romber_telecomm.addresses ( telecomm_address_status_id, telecomm_address_type_id ) values ( ( select telecomm_address_status_id from romber_telecomm.address_statuses where telecomm_address_status_code = 'Active' ), ( select telecomm_address_type_id from romber_telecomm.address_types where telecomm_address_type_code = 'TELEPHONE_AREA_CODE' ) );