This table provides a list of measurement units which are valid for each measurement type.
Source romber_measurement_type_units_tbl.sql
create table romber_base.measurement_type_units ( measurement_type_id romber_base.measurement_type_id not null, measurement_unit_id romber_base.measurement_unit_id not null );
Source romber_measurement_type_units_pk.sql
alter table romber_base.measurement_type_units add constraint romber_measurement_type_units_pk primary key ( measurement_type_id, measurement_unit_id );
Source romber_measurement_type_units_fk1.sql
alter table romber_base.measurement_type_units add constraint romber_measurement_type_units_fk1 foreign key ( measurement_type_id ) references romber_base.measurement_types ( measurement_type_id );
Source romber_measurement_type_units_fk2.sql
alter table romber_base.measurement_type_units add constraint romber_measurement_type_units_fk2 foreign key ( measurement_unit_id ) references romber_base.measurement_units ( measurement_unit_id );
Source romber_measurement_type_units_load.sql
insert into romber_base.measurement_type_units ( measurement_type_id, measurement_unit_id ) select t1.measurement_type_id, t2.measurement_unit_id from romber_base.measurement_types t1 inner join romber_base.measurement_units t2 using ( measurement_category_id );