default

Romber

Database tables

romber_location.types

Purpose

This table provides a list of valid location types. This information is static and doesn't need a data entry page.

Definition

Source romber_location_types_tbl.sql

create table romber_location.types (
  address_or_not                boolean                                 not null,
  associated_meta_class_id      romber_meta.class_id                    not null,
  component_or_not              boolean                                 not null,
  location_type_code            romber_base.generic_code                not null,
  location_type_id              romber_location.type_id not null
                                  default nextval ( 'romber_base.generic_id_seq' ),
  location_type_name            romber_base.generic_name                not null );

Constraints

Source romber_location_types_pk.sql

alter table romber_location.types
  add constraint romber_location_types_pk
    primary key ( location_type_id );

Source romber_location_types_uk1.sql

alter table romber_location.types
  add constraint romber_location_types_uk1
    unique ( location_type_code );

Source romber_location_types_fk1.sql

alter table romber_location.types
  add constraint romber_location_types_fk1
    foreign key ( associated_meta_class_id )
    references romber_meta.classes ( meta_class_id );

Load

Source romber_location_types_load.sql

insert into romber_location.types (
    address_or_not,
    associated_meta_class_id,
    component_or_not,
    location_type_code,
    location_type_id,
    location_type_name )
  values (
    false,
    0,
    false,
    '',
    0,
    '' );

 

Copyright © Corpita Pty Ltd 1987 - 2024

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