         formule varchar,
         formule_indexed varchar,
         cristal_system varchar,
-        unit_class_ref classifications_ids,
+        unit_class_ref integer default 0 not null,
         unit_class_indexed classifications_names,
-        unit_division_ref classifications_ids,
+        unit_division_ref integer default 0 not null,
         unit_division_indexed classifications_names,
-        unit_family_ref classifications_ids,
+        unit_family_ref integer default 0 not null,
         unit_family_indexed classifications_names,
-        unit_group_ref classifications_ids,
+        unit_group_ref integer default 0 not null,
         unit_group_indexed classifications_names,
-        unit_variety_ref classifications_ids,
+        unit_variety_ref integer default 0 not null,
         unit_variety_indexed classifications_names,
         constraint pk_mineralogy primary key (id),
         constraint unq_mineralogy unique (path, name_indexed, level_ref),

create table lithostratigraphy
       (
        id integer not null default nextval('lithostratigraphy_id_seq'),
        group_ref classifications_ids,
        group_indexed classifications_names,
        formation_ref classifications_ids,
        formation_indexed classifications_names,
        member_ref classifications_ids,
        member_indexed classifications_names,
        layer_ref classifications_ids,
        layer_indexed classifications_names,
        sub_level_1_ref classifications_ids,
        sub_level_1_indexed classifications_names,
        sub_level_2_ref classifications_ids,
        sub_level_2_indexed classifications_names,
        constraint pk_lithostratigraphy primary key (id),
        constraint unq_lithostratigraphy unique (path, name_indexed, level_ref),

create table lithology
       (
        id integer not null default nextval('lithology_id_seq'),
        unit_main_group_ref integer default 0 not null,
        unit_main_group_indexed classifications_names,
        unit_group_ref integer default 0 not null,
        unit_group_indexed classifications_names,
        unit_sub_group_ref integer default 0 not null,
        unit_sub_group_indexed classifications_names,
        unit_rock_ref integer default 0 not null,
        unit_rock_indexed classifications_names,
        constraint pk_lithology primary key (id),
        constraint unq_lithology unique (path, name_indexed, level_ref),
