default

Romber

Database tables

romber_location.countries

Purpose

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

Definition

Source romber_countries_tbl.sql

create table romber_location.countries (
  country_adjective             romber_base.generic_name        not null,
  country_code                  romber_base.generic_code        not null,
  country_id                    romber_location.location_id     not null
                                  default nextval ( 'romber_base.generic_id_seq' ),
  country_name                  romber_base.generic_name        not null,
  iso_3166_or_not               boolean                         not null,
  itu_e164_or_not               boolean                         not null,
  num_internet_addresses        int                             not null,
  num_internet_address_ranges   int                             not null,
  telephone_country_code        romber_base.generic_code        not null );

Constraints

Source romber_countries_pk.sql

alter table romber_location.countries
  add constraint romber_countries_pk
    primary key ( country_id );

Source romber_countries_uk1.sql

alter table romber_location.countries
  add constraint romber_countries_uk1
    unique ( country_code );

Source romber_countries_fk1.sql

alter table romber_location.countries
  add constraint romber_countries_fk1
    foreign key ( country_id )
    references romber_location.locations ( location_id );

Load

Source romber_countries_load.sql

insert into romber_location.countries (
    country_adjective,
    country_id,
    country_code,
    country_name,
    iso_3166_or_not,
    itu_e164_or_not,
    num_internet_addresses,
    num_internet_address_ranges,
    telephone_country_code )
  values (
    '',
    0,
    '',
    '',
    false,
    false,
    0,
    0,
    '' );

 

Copyright © Corpita Pty Ltd 1987 - 2024

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