default

Romber

Database tables

romber_location.country_zones

Purpose

This table provides a list of valid country zones which can be selected by web site users. This information is static and doesn't need a data entry page.

Definition

Source romber_country_zones_tbl.sql

create table romber_location.country_zones (
  country_id                    romber_location.location_id     not null,
  country_zone_code             romber_base.generic_code        not null,
  country_zone_id               romber_location.location_id     not null,
  country_zone_name             romber_base.generic_name        not null );

Constraints

Source romber_country_zones_pk.sql

alter table romber_location.country_zones
  add constraint romber_country_zones_pk
    primary key ( country_zone_id );

Source romber_country_zones_uk1.sql

alter table romber_location.country_zones
  add constraint romber_country_zones_uk1
    unique (
      country_id,
      country_zone_code );

Source romber_country_zones_fk1.sql

alter table romber_location.country_zones
  add constraint romber_country_zones_fk1
    foreign key ( country_zone_id )
    references romber_location.locations ( location_id );

Source romber_country_zones_fk2.sql

alter table romber_location.country_zones
  add constraint romber_country_zones_fk2
    foreign key ( country_id )
    references romber_location.countries ( country_id );

Load

Source romber_country_zones_load.sql

insert into romber_location.country_zones (
    country_id,
    country_zone_code,
    country_zone_id,
    country_zone_name )
  values (
    0,
    '',
    0,
    '' );

 

Copyright © Corpita Pty Ltd 1987 - 2024

Developed by romber.net
Page modified on 28-Apr-2023