default

Romber

Database tables

romber_location.raw_addresses

Purpose

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

Definition

Source romber_raw_addresses_tbl.sql

create table romber_location.raw_addresses (
  address_1             romber_base.generic_name        not null,
  address_2             romber_base.generic_name        not null,
  address_3             romber_base.generic_name        not null,
  address_key           varchar(255)                    not null,
  locality_id           romber_location.location_id     not null,
  raw_address_id        romber_location.location_id     not null );

Constraints

Source romber_raw_addresses_pk.sql

alter table romber_location.raw_addresses
  add constraint romber_raw_addresses_pk
    primary key ( raw_address_id );

Source romber_raw_addresses_uk1.sql

alter table romber_location.raw_addresses
  add constraint romber_raw_addresses_uk1
    unique (
      locality_id,
      address_key );

Source romber_raw_addresses_fk1.sql

alter table romber_location.raw_addresses
  add constraint romber_raw_addresses_fk1
    foreign key ( raw_address_id )
    references romber_location.locations ( location_id );

Source romber_raw_addresses_fk2.sql

alter table romber_location.raw_addresses
  add constraint romber_raw_addresses_fk2
    foreign key ( locality_id )
    references romber_location.localities ( locality_id );

 

Copyright © Corpita Pty Ltd 1987 - 2024

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