# brapi-java 全量建表语句汇总

- 来源文件：`src/main/resources/db/migration/V001__initial_schema.sql`
- 表总数：224

## 表关系简述（按业务域）

- 核心域：`trial`、`study`、`program`、`location`、`season`、`crop` 等构成主干；`study` 连接 `trial/crop/location`，`trial` 再向 `observation_unit`、`plate`、`vendor_order` 等扩展。
- 种质域（germ）：以 `germplasm` 为中心，关联 `germplasm_donor/germplasm_origin/germplasm_taxon/germplasm_attribute_value`，并通过 `cross_entity/cross_parent/pedigree*` 描述亲本和谱系。
- 表型域（pheno）：`observation_unit` 与 `observation` 为主线，`observation` 关联 `observation_variable`；变量再关联 `trait/method/scale` 及 `ontology_ref`。
- 基因型域（geno）：`variantset` 关联 `variant`、`callset`、`reference_set`；`reference_set -> reference -> reference_bases`；`marker_position` 连接 `variant` 与 `linkage_group/genome_map`。
- 通用扩展：大量主表通过 `*_additional_info` 和 `*_external_references` 关联到 `additional_info` 与 `external_reference`，用于补充键值对和外部引用。

### 主要业务域表清单

- Core：crop, list, location, person, program, search, season, study, trial
- Germplasm：breeding_method, breeding_method_additional_info, breeding_method_external_references, cross_entity, cross_entity_additional_info, cross_entity_cross_attributes, cross_entity_external_references, cross_parent, cross_pollination_event, crossing_project, crossing_project_additional_info, crossing_project_external_references, donor, germplasm, germplasm_additional_info, germplasm_attribute_category, germplasm_attribute_definition, germplasm_attribute_value, germplasm_attribute_value_additional_info, germplasm_attribute_value_external_references, germplasm_donor, germplasm_donor_additional_info, germplasm_donor_external_references, germplasm_entity_type_of_germplasm_storage_code, germplasm_external_references, germplasm_germplasm_type_storage_code, germplasm_institute, germplasm_origin, germplasm_search_results, germplasm_synonym, germplasm_taxon, germplasm_type_storage_code, pedigree, pedigree_edge, pedigree_edge_additional_info, pedigree_edge_external_references, pedigree_node, pedigree_node_additional_info, pedigree_node_external_references, seed_lot, seed_lot_additional_info, seed_lot_content_mixture, seed_lot_external_references, seed_lot_transaction, seed_lot_transaction_additional_info, seed_lot_transaction_external_references
- Phenotype：breeding_method, breeding_method_additional_info, breeding_method_external_references, cross_pollination_event, event, event_additional_info, event_entity_dates, event_external_references, event_observation_units, event_param, event_parameter_entity_values_by_date, image, image_additional_info, image_entity_additional_info, image_entity_descriptive_ontology_terms, image_external_references, image_observations, marker_analysis_method, marker_marker_analysis_method, method, method_additional_info, method_external_references, method_ontology_reference, observation, observation_additional_info, observation_external_references, observation_unit, observation_unit_additional_info, observation_unit_external_references, observation_unit_level, observation_unit_position, observation_unit_treatment, observation_unit_xref, observation_variable, observation_variable_context, observation_variable_synonym, ontology, ontology_additional_info, ontology_entity_documentation_links, ontology_external_references, ontology_ref, scale, scale_additional_info, scale_entity_valid_value_categories, scale_external_references, scale_ontology_reference, scale_valid_value_category, study_observation_level, study_variable, trait, trait_abbreviation, trait_additional_info, trait_entity_alternative_abbreviations, trait_entity_synonyms, trait_external_references, trait_ontology_reference, trait_synonym, treatment, variable_base_entity, variable_base_entity_additional_info, variable_base_entity_context_of_use, variable_base_entity_external_references, variable_base_entity_ontology_reference, variable_base_entity_synonyms
- Genotype：allele, allele_call, allele_call_additional_info, allele_call_external_references, allele_matrix, breeding_method_external_references, callset, callset_additional_info, callset_external_references, callset_variant_sets, crop_external_references, cross_entity_external_references, crossing_project_external_references, event_external_references, external_reference, genome_map, genome_map_additional_info, genome_map_external_references, genome_map_studies, germplasm_attribute_value_external_references, germplasm_donor_external_references, germplasm_external_references, image_external_references, linkage_group, linkage_group_additional_info, linkage_group_external_references, list_external_references, location_external_references, marker, marker_analysis_method, marker_marker_analysis_method, marker_position, marker_position_additional_info, marker_position_external_references, marker_profile, marker_reference, marker_synonym, method_external_references, method_ontology_reference, observation_external_references, observation_unit_external_references, ontology_external_references, pedigree_edge_external_references, pedigree_node_external_references, person_external_references, plate, plate_additional_info, plate_external_references, plate_submission, plate_submission_additional_info, plate_submission_external_references, program_external_references, reference, reference_additional_info, reference_bases, reference_bases_additional_info, reference_bases_external_references, reference_external_references, reference_set, reference_set_additional_info, reference_set_external_references, sample_external_references, scale_external_references, scale_ontology_reference, search_external_references, season_external_references, seed_lot_external_references, seed_lot_transaction_external_references, study_external_references, study_marker_profile, trait_external_references, trait_ontology_reference, trial_external_references, variable_base_entity_external_references, variable_base_entity_ontology_reference, variant, variant_additional_info, variant_entity_alternate_bases, variant_entity_ciend, variant_entity_cipos, variant_entity_filters_failed, variant_external_references, variant_set_analysis_entity_software, variantset, variantset_additional_info, variantset_analysis, variantset_external_references, variantset_format, vendor_file, vendor_file_sample, vendor_order, vendor_order_additional_info, vendor_order_entity_required_service_info, vendor_order_entity_service_ids, vendor_order_external_references, vendor_spec, vendor_spec_additional_info, vendor_spec_deliverable, vendor_spec_external_references, vendor_spec_input_format, vendor_spec_platform, vendor_spec_requirement, vendor_spec_sample_type, vendor_spec_status, vendor_spec_well_position

## 全部 CREATE TABLE 语句

### additional_info
```sql
CREATE TABLE additional_info (
    id varchar(255) NOT NULL,
    key varchar(255),
    value bytea
);
```

### allele
```sql
CREATE TABLE allele (
    id character varying(255) NOT NULL,
    allele_code character varying(255),
    marker_id character varying(255),
    marker_profile_id character varying(255),
    matrix_id character varying(255),
    sample_id character varying(255)
);
```

### allele_call
```sql
CREATE TABLE allele_call (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    genotype varchar(255),
    genotype_likelihood double precision,
    phase_set varchar(255),
    read_depth integer,
    call_set_id varchar(255),
    variant_id varchar(255)
);
```

### allele_call_additional_info
```sql
CREATE TABLE allele_call_additional_info (
    call_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### allele_call_external_references
```sql
CREATE TABLE allele_call_external_references (
    call_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### allele_matrix
```sql
CREATE TABLE allele_matrix (
    id character varying(255) NOT NULL,
    description character varying(255),
    last_updated timestamp without time zone,
    name character varying(255),
    study_id character varying(255)
);
```

### breeding_method
```sql
CREATE TABLE breeding_method (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    abbreviation varchar(255),
    description varchar(255),
    name varchar(255)
);
```

### breeding_method_additional_info
```sql
CREATE TABLE breeding_method_additional_info (
    breeding_method_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### breeding_method_external_references
```sql
CREATE TABLE breeding_method_external_references (
    breeding_method_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### callset
```sql
CREATE TABLE callset (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    call_set_name varchar(255),
    created timestamp without time zone,
    updated timestamp without time zone,
    sample_id varchar(255)
);
```

### callset_additional_info
```sql
CREATE TABLE callset_additional_info (
    call_set_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### callset_external_references
```sql
CREATE TABLE callset_external_references (
    call_set_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### callset_variant_sets
```sql
CREATE TABLE callset_variant_sets (
    call_sets_id varchar(255) NOT NULL,
    variant_sets_id varchar(255) NOT NULL
);
```

### contact
```sql
CREATE TABLE contact (
    id varchar(255) NOT NULL,
    email varchar(255),
    institute_name varchar(255),
    name varchar(255),
    orcid varchar(255),
    study_db_id varchar(255),
    trial_db_id varchar(255),
    type varchar(255)
);
```

### coordinate
```sql
CREATE TABLE coordinate (
    id varchar(255) NOT NULL,
    altitude numeric(9,6),
    latitude numeric(9,6),
    longitude numeric(9,6),
    geojson_id varchar(255)
);
```

### crop
```sql
CREATE TABLE crop (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    crop_name varchar(255)
);
```

### crop_additional_info
```sql
CREATE TABLE crop_additional_info (
    crop_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### crop_external_references
```sql
CREATE TABLE crop_external_references (
    crop_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### cross_entity
```sql
CREATE TABLE cross_entity (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    cross_type integer,
    name varchar(255),
    planned boolean,
    status integer,
    crossing_project_id varchar(255),
    planned_cross_id varchar(255)
);
```

### cross_entity_additional_info
```sql
CREATE TABLE cross_entity_additional_info (
    cross_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### cross_entity_cross_attributes
```sql
CREATE TABLE cross_entity_cross_attributes (
    cross_entity_id varchar(255) NOT NULL,
    cross_attributes varchar(255)
);
```

### cross_entity_external_references
```sql
CREATE TABLE cross_entity_external_references (
    cross_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### cross_parent
```sql
CREATE TABLE cross_parent (
    id varchar(255) NOT NULL,
    parent_type integer,
    cross_id varchar(255),
    crossing_project_id varchar(255),
    germplasm_id varchar(255),
    observation_unit_id varchar(255)
);
```

### cross_pollination_event
```sql
CREATE TABLE cross_pollination_event (
    id varchar(255) NOT NULL,
    pollination_number varchar(255),
    pollination_successful boolean,
    pollination_time_stamp timestamp without time zone,
    cross_id varchar(255)
);
```

### crossing_project
```sql
CREATE TABLE crossing_project (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    description varchar(255),
    name varchar(255),
    program_id varchar(255)
);
```

### crossing_project_additional_info
```sql
CREATE TABLE crossing_project_additional_info (
    crossing_project_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### crossing_project_external_references
```sql
CREATE TABLE crossing_project_external_references (
    crossing_project_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### data_link
```sql
CREATE TABLE data_link (
    id character varying(255) NOT NULL,
    name character varying(255),
    study_db_id character varying(255),
    type character varying(255),
    url character varying(255)
);
```

### donor
```sql
CREATE TABLE donor (
    id character varying(255) NOT NULL,
    donor_accession_number character varying(255),
    donor_institute_code character varying(255),
    germplasm_db_id character varying(255),
    germplasmpui character varying(255)
);
```

### event
```sql
CREATE TABLE event (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    event_description varchar(255),
    event_type varchar(255),
    event_type_db_id varchar(255),
    study_id varchar(255)
);
```

### event_additional_info
```sql
CREATE TABLE event_additional_info (
    event_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### event_entity_dates
```sql
CREATE TABLE event_entity_dates (
    event_entity_id varchar(255) NOT NULL,
    dates timestamp without time zone
);
```

### event_external_references
```sql
CREATE TABLE event_external_references (
    event_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### event_observation_units
```sql
CREATE TABLE event_observation_units (
    event_entity_id varchar(255) NOT NULL,
    observation_units_id varchar(255) NOT NULL
);
```

### event_param
```sql
CREATE TABLE event_param (
    id varchar(255) NOT NULL,
    code varchar(255),
    description varchar(255),
    key varchar(255),
    name varchar(255),
    rdf_value varchar(255),
    units varchar(255),
    value varchar(255),
    value_description varchar(255),
    event_id varchar(255)
);
```

### event_parameter_entity_values_by_date
```sql
CREATE TABLE event_parameter_entity_values_by_date (
    event_parameter_entity_id varchar(255) NOT NULL,
    values_by_date varchar(255)
);
```

### external_reference
```sql
CREATE TABLE external_reference (
    id varchar(255) NOT NULL,
    external_reference_id varchar(255),
    external_reference_source varchar(255)
);
```

### genome_map
```sql
CREATE TABLE genome_map (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    comments varchar(255),
    documentationurl varchar(255),
    map_name varchar(255),
    mappui varchar(255),
    published_date timestamp without time zone,
    scientific_name varchar(255),
    type varchar(255),
    unit varchar(255),
    crop_id varchar(255)
);
```

### genome_map_additional_info
```sql
CREATE TABLE genome_map_additional_info (
    genome_map_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### genome_map_external_references
```sql
CREATE TABLE genome_map_external_references (
    genome_map_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### genome_map_studies
```sql
CREATE TABLE genome_map_studies (
    genome_map_entity_id varchar(255) NOT NULL,
    studies_id varchar(255) NOT NULL
);
```

### geojson
```sql
CREATE TABLE geojson (
    id varchar(255) NOT NULL,
    type varchar(255)
);
```

### germplasm
```sql
CREATE TABLE germplasm (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    accession_number varchar(255),
    acquisition_date timestamp without time zone,
    acquisition_source_code integer,
    biological_status_of_accession_code integer,
    collection varchar(255),
    country_of_origin_code varchar(255),
    default_display_name varchar(255),
    documentationurl varchar(255),
    genus varchar(255),
    germplasm_name varchar(255),
    germplasmpui varchar(255),
    germplasm_preprocessing varchar(255),
    mls_status integer,
    seed_source varchar(255),
    seed_source_description varchar(255),
    species varchar(255),
    species_authority varchar(255),
    subtaxa varchar(255),
    subtaxa_authority varchar(255),
    breeding_method_id varchar(255),
    crop_id varchar(255)
);
```

### germplasm_additional_info
```sql
CREATE TABLE germplasm_additional_info (
    germplasm_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### germplasm_attribute_category
```sql
CREATE TABLE germplasm_attribute_category (
    id character varying(255) NOT NULL,
    name character varying(255)
);
```

### germplasm_attribute_definition
```sql
CREATE TABLE germplasm_attribute_definition (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    default_value varchar(255),
    documentationurl varchar(255),
    growth_stage varchar(255),
    institution varchar(255),
    language varchar(255),
    scientist varchar(255),
    status varchar(255),
    submission_timestamp timestamp without time zone,
    crop_id varchar(255),
    method_id varchar(255),
    ontology_id varchar(255),
    scale_id varchar(255),
    trait_id varchar(255),
    attribute_category varchar(255),
    code varchar(255),
    datatype varchar(255),
    description varchar(255),
    name varchar(255),
    pui varchar(255),
    uri varchar(255)
);
```

### germplasm_attribute_value
```sql
CREATE TABLE germplasm_attribute_value (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    determined_date timestamp without time zone,
    value varchar(255),
    attribute_id varchar(255),
    germplasm_id varchar(255)
);
```

### germplasm_attribute_value_additional_info
```sql
CREATE TABLE germplasm_attribute_value_additional_info (
    germplasm_attribute_value_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### germplasm_attribute_value_external_references
```sql
CREATE TABLE germplasm_attribute_value_external_references (
    germplasm_attribute_value_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### germplasm_donor
```sql
CREATE TABLE germplasm_donor (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    donor_accession_number varchar(255),
    donor_institute_code varchar(255),
    donor_institute_name varchar(255),
    germplasmpui varchar(255),
    germplasm_id varchar(255)
);
```

### germplasm_donor_additional_info
```sql
CREATE TABLE germplasm_donor_additional_info (
    donor_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### germplasm_donor_external_references
```sql
CREATE TABLE germplasm_donor_external_references (
    donor_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### germplasm_entity_type_of_germplasm_storage_code
```sql
CREATE TABLE germplasm_entity_type_of_germplasm_storage_code (
    germplasm_entity_id varchar(255) NOT NULL,
    type_of_germplasm_storage_code integer
);
```

### germplasm_external_references
```sql
CREATE TABLE germplasm_external_references (
    germplasm_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### germplasm_germplasm_type_storage_code
```sql
CREATE TABLE germplasm_germplasm_type_storage_code (
    germplasm_dbid character varying(255) NOT NULL,
    germplasm_type_storage_code_dbid character varying(255) NOT NULL
);
```

### germplasm_institute
```sql
CREATE TABLE germplasm_institute (
    id varchar(255) NOT NULL,
    institute_address varchar(255),
    institute_code varchar(255),
    institute_name varchar(255),
    institute_type integer,
    germplasm_id varchar(255)
);
```

### germplasm_origin
```sql
CREATE TABLE germplasm_origin (
    id varchar(255) NOT NULL,
    coordinate_uncertainty varchar(255),
    coordinates_id varchar(255),
    germplasm_id varchar(255)
);
```

### germplasm_search_results
```sql
CREATE TABLE germplasm_search_results (
    germplasm_entity_id varchar(255) NOT NULL,
    search_results_id varchar(255) NOT NULL
);
```

### germplasm_synonym
```sql
CREATE TABLE germplasm_synonym (
    id varchar(255) NOT NULL,
    synonym varchar(255),
    type varchar(255),
    germplasm_id varchar(255)
);
```

### germplasm_taxon
```sql
CREATE TABLE germplasm_taxon (
    id varchar(255) NOT NULL,
    source_name varchar(255),
    taxon_id varchar(255),
    germplasm_id varchar(255)
);
```

### germplasm_type_storage_code
```sql
CREATE TABLE germplasm_type_storage_code (
    id character varying(255) NOT NULL,
    storage_code integer
);
```

### image
```sql
CREATE TABLE image (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    copyright varchar(255),
    description varchar(255),
    image_data bytea,
    image_file_name varchar(255),
    image_file_size integer,
    image_height integer,
    imagemimetype varchar(255),
    imageurl varchar(255),
    image_width integer,
    name varchar(255),
    time_stamp timestamp without time zone,
    coordinates_id varchar(255),
    observation_unit_id varchar(255)
);
```

### image_additional_info
```sql
CREATE TABLE image_additional_info (
    image_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### image_entity_additional_info
```sql
CREATE TABLE image_entity_additional_info (
    image_entity_id character varying(255) NOT NULL,
    additional_info character varying(255)
);
```

### image_entity_descriptive_ontology_terms
```sql
CREATE TABLE image_entity_descriptive_ontology_terms (
    image_entity_id varchar(255) NOT NULL,
    descriptive_ontology_terms varchar(255)
);
```

### image_external_references
```sql
CREATE TABLE image_external_references (
    image_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### image_observations
```sql
CREATE TABLE image_observations (
    image_entity_id varchar(255) NOT NULL,
    observations_id varchar(255) NOT NULL
);
```

### linkage_group
```sql
CREATE TABLE linkage_group (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    linkage_group_name varchar(255),
    max_marker_position integer,
    genome_map_id varchar(255)
);
```

### linkage_group_additional_info
```sql
CREATE TABLE linkage_group_additional_info (
    linkage_group_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### linkage_group_external_references
```sql
CREATE TABLE linkage_group_external_references (
    linkage_group_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### list
```sql
CREATE TABLE list (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    date_created timestamp without time zone,
    date_modified timestamp without time zone,
    description varchar(255),
    list_name varchar(255),
    list_owner_name varchar(255),
    list_source varchar(255),
    list_type integer,
    list_owner_person_id varchar(255)
);
```

### list_additional_info
```sql
CREATE TABLE list_additional_info (
    list_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### list_external_references
```sql
CREATE TABLE list_external_references (
    list_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### list_item
```sql
CREATE TABLE list_item (
    id varchar(255) NOT NULL,
    item varchar(255),
    list_id varchar(255)
);
```

### location
```sql
CREATE TABLE location (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    abbreviation varchar(255),
    coordinate_description varchar(255),
    coordinate_uncertainty varchar(255),
    country_code varchar(255),
    country_name varchar(255),
    documentationurl varchar(255),
    environment_type varchar(255),
    exposure varchar(255),
    institute_address varchar(255),
    institute_name varchar(255),
    location_name varchar(255),
    location_type varchar(255),
    site_status varchar(255),
    slope varchar(255),
    topography varchar(255),
    coordinates_id varchar(255),
    crop_id varchar(255),
    parent_location_id varchar(255),
    program_id varchar(255)
);
```

### location_additional_info
```sql
CREATE TABLE location_additional_info (
    location_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### location_external_references
```sql
CREATE TABLE location_external_references (
    location_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### marker
```sql
CREATE TABLE marker (
    id character varying(255) NOT NULL,
    location integer,
    marker_name character varying(255),
    type character varying(255),
    linkage_group_id character varying(255)
);
```

### marker_analysis_method
```sql
CREATE TABLE marker_analysis_method (
    id character varying(255) NOT NULL,
    method_name character varying(255)
);
```

### marker_marker_analysis_method
```sql
CREATE TABLE marker_marker_analysis_method (
    marker_db_id character varying(255) NOT NULL,
    marker_analysis_method_db_id character varying(255) NOT NULL
);
```

### marker_position
```sql
CREATE TABLE marker_position (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    "position" integer,
    linkage_group_id varchar(255),
    variant_id varchar(255)
);
```

### marker_position_additional_info
```sql
CREATE TABLE marker_position_additional_info (
    marker_position_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### marker_position_external_references
```sql
CREATE TABLE marker_position_external_references (
    marker_position_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### marker_profile
```sql
CREATE TABLE marker_profile (
    id character varying(255) NOT NULL,
    analysis_method character varying(255),
    extract_db_id character varying(255),
    germplasm_db_id character varying(255),
    sample_db_id character varying(255),
    unique_display_name character varying(255)
);
```

### marker_reference
```sql
CREATE TABLE marker_reference (
    id character varying(255) NOT NULL,
    alternative boolean,
    marker_db_id character varying(255),
    reference character varying(255)
);
```

### marker_synonym
```sql
CREATE TABLE marker_synonym (
    id character varying(255) NOT NULL,
    marker_db_id character varying(255),
    synonym character varying(255)
);
```

### method
```sql
CREATE TABLE method (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    description varchar(255),
    formula varchar(255),
    method_class varchar(255),
    methodpui varchar(255),
    name varchar(255),
    reference varchar(255),
    ontology_id varchar(255)
);
```

### method_additional_info
```sql
CREATE TABLE method_additional_info (
    method_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### method_external_references
```sql
CREATE TABLE method_external_references (
    method_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### method_ontology_reference
```sql
CREATE TABLE method_ontology_reference (
    method_entity_id varchar(255) NOT NULL,
    ontology_reference_id varchar(255) NOT NULL
);
```

### observation
```sql
CREATE TABLE observation (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    collector varchar(255),
    observation_time_stamp timestamp without time zone,
    uploaded_by varchar(255),
    value varchar(255),
    crop_id varchar(255),
    geo_coordinates_id varchar(255),
    observation_unit_id varchar(255),
    observation_variable_id varchar(255),
    program_id varchar(255),
    season_id varchar(255),
    study_id varchar(255),
    trial_id varchar(255)
);
```

### observation_additional_info
```sql
CREATE TABLE observation_additional_info (
    observation_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### observation_external_references
```sql
CREATE TABLE observation_external_references (
    observation_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### observation_unit
```sql
CREATE TABLE observation_unit (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    observation_unit_name varchar(255),
    observation_unitpui varchar(255),
    crop_id varchar(255),
    cross_id varchar(255),
    germplasm_id varchar(255),
    program_id varchar(255),
    seed_lot_id varchar(255),
    study_id varchar(255),
    trial_id varchar(255)
);
```

### observation_unit_additional_info
```sql
CREATE TABLE observation_unit_additional_info (
    observation_unit_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### observation_unit_external_references
```sql
CREATE TABLE observation_unit_external_references (
    observation_unit_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### observation_unit_level
```sql
CREATE TABLE observation_unit_level (
    id varchar(255) NOT NULL,
    level_code varchar(255),
    level_name integer,
    level_order integer,
    observation_unit_id varchar(255),
    position_id varchar(255)
);
```

### observation_unit_position
```sql
CREATE TABLE observation_unit_position (
    id varchar(255) NOT NULL,
    entry_type integer,
    level_code varchar(255),
    level_name integer,
    level_order integer,
    position_coordinatex varchar(255),
    position_coordinatextype integer,
    position_coordinatey varchar(255),
    position_coordinateytype integer,
    geo_coordinates_id varchar(255),
    observation_unit_id varchar(255)
);
```

### observation_unit_treatment
```sql
CREATE TABLE observation_unit_treatment (
    id varchar(255) NOT NULL,
    factor varchar(255),
    modality varchar(255),
    observation_unit_id varchar(255)
);
```

### observation_unit_xref
```sql
CREATE TABLE observation_unit_xref (
    id character varying(255) NOT NULL,
    observation_unit_db_id character varying(255),
    source character varying(255),
    xref character varying(255)
);
```

### observation_variable
```sql
CREATE TABLE observation_variable (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    default_value varchar(255),
    documentationurl varchar(255),
    growth_stage varchar(255),
    institution varchar(255),
    language varchar(255),
    scientist varchar(255),
    status varchar(255),
    submission_timestamp timestamp without time zone,
    crop_id varchar(255),
    method_id varchar(255),
    ontology_id varchar(255),
    scale_id varchar(255),
    trait_id varchar(255),
    name varchar(255),
    pui varchar(255)
);
```

### observation_variable_context
```sql
CREATE TABLE observation_variable_context (
    id character varying(255) NOT NULL,
    context character varying(255),
    observation_variable_db_id character varying(255)
);
```

### observation_variable_synonym
```sql
CREATE TABLE observation_variable_synonym (
    id character varying(255) NOT NULL,
    observation_variable_db_id character varying(255),
    synonym character varying(255)
);
```

### ontology
```sql
CREATE TABLE ontology (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    authors varchar(255),
    copyright varchar(255),
    description varchar(255),
    documentationurl varchar(255),
    licence varchar(255),
    ontology_name varchar(255),
    version varchar(255)
);
```

### ontology_additional_info
```sql
CREATE TABLE ontology_additional_info (
    ontology_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### ontology_entity_documentation_links
```sql
CREATE TABLE ontology_entity_documentation_links (
    ontology_entity_id varchar(255) NOT NULL,
    documentation_links varchar(255)
);
```

### ontology_external_references
```sql
CREATE TABLE ontology_external_references (
    ontology_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### ontology_ref
```sql
CREATE TABLE ontology_ref (
    id varchar(255) NOT NULL,
    url varchar(255),
    type integer
);
```

### pedigree
```sql
CREATE TABLE pedigree (
    id character varying(255) NOT NULL,
    crossing_plan character varying(255),
    crossing_year integer,
    family_code character varying(255),
    notation character varying(255),
    parent1type character varying(255),
    parent2type character varying(255),
    pedigree character varying(255),
    germplasm_db_id character varying(255),
    parent1_db_id character varying(255),
    parent2_db_id character varying(255)
);
```

### pedigree_edge
```sql
CREATE TABLE pedigree_edge (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    edge_type integer,
    parent_type integer,
    connceted_node_id varchar(255),
    this_node_id varchar(255)
);
```

### pedigree_edge_additional_info
```sql
CREATE TABLE pedigree_edge_additional_info (
    pedigree_edge_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### pedigree_edge_external_references
```sql
CREATE TABLE pedigree_edge_external_references (
    pedigree_edge_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### pedigree_node
```sql
CREATE TABLE pedigree_node (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    crossing_year integer,
    family_code varchar(255),
    pedigree_string varchar(255),
    crossing_project_id varchar(255),
    germplasm_id varchar(255)
);
```

### pedigree_node_additional_info
```sql
CREATE TABLE pedigree_node_additional_info (
    pedigree_node_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### pedigree_node_external_references
```sql
CREATE TABLE pedigree_node_external_references (
    pedigree_node_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### person
```sql
CREATE TABLE person (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    description varchar(255),
    email_address varchar(255),
    first_name varchar(255),
    institute_name varchar(255),
    last_name varchar(255),
    mailing_address varchar(255),
    middle_name varchar(255),
    phone_number varchar(255),
    userid varchar(255)
);
```

### person_additional_info
```sql
CREATE TABLE person_additional_info (
    person_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### person_external_references
```sql
CREATE TABLE person_external_references (
    person_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### plate
```sql
CREATE TABLE plate (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    client_plate_barcode varchar(255),
    client_plate_db_id varchar(255),
    plate_barcode varchar(255),
    plate_format integer,
    plate_name varchar(255),
    sample_submission_format integer,
    sample_type integer,
    status_time_stamp timestamp without time zone,
    program_id varchar(255),
    study_id varchar(255),
    submission_id varchar(255),
    trial_id varchar(255)
);
```

### plate_additional_info
```sql
CREATE TABLE plate_additional_info (
    plate_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### plate_external_references
```sql
CREATE TABLE plate_external_references (
    plate_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### plate_submission
```sql
CREATE TABLE plate_submission (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    client_id varchar(255),
    number_of_samples integer,
    sample_type integer,
    order_id varchar(255)
);
```

### plate_submission_additional_info
```sql
CREATE TABLE plate_submission_additional_info (
    vendor_plate_submission_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### plate_submission_external_references
```sql
CREATE TABLE plate_submission_external_references (
    vendor_plate_submission_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### program
```sql
CREATE TABLE program (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    abbreviation varchar(255),
    documentationurl varchar(255),
    funding_information varchar(255),
    name varchar(255),
    objective varchar(255),
    program_type integer,
    crop_id varchar(255),
    lead_person_id varchar(255)
);
```

### program_additional_info
```sql
CREATE TABLE program_additional_info (
    program_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### program_external_references
```sql
CREATE TABLE program_external_references (
    program_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### reference
```sql
CREATE TABLE reference (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    length integer,
    md5checksum varchar(255),
    reference_name varchar(255),
    source_divergence numeric(19,2),
    reference_set_id varchar(255)
);
```

### reference_additional_info
```sql
CREATE TABLE reference_additional_info (
    reference_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### reference_bases
```sql
CREATE TABLE reference_bases (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    bases varchar(2048),
    page_number integer,
    reference_id varchar(255)
);
```

### reference_bases_additional_info
```sql
CREATE TABLE reference_bases_additional_info (
    reference_bases_page_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### reference_bases_external_references
```sql
CREATE TABLE reference_bases_external_references (
    reference_bases_page_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### reference_external_references
```sql
CREATE TABLE reference_external_references (
    reference_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### reference_set
```sql
CREATE TABLE reference_set (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    assemblypui varchar(255),
    description varchar(255),
    is_derived boolean,
    md5checksum varchar(255),
    reference_set_name varchar(255),
    sourceuri varchar(255),
    species_ontology_term varchar(255),
    species_ontology_termuri varchar(255),
    source_germplasm_id varchar(255)
);
```

### reference_set_additional_info
```sql
CREATE TABLE reference_set_additional_info (
    reference_set_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### reference_set_external_references
```sql
CREATE TABLE reference_set_external_references (
    reference_set_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### sample
```sql
CREATE TABLE sample (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    concentration varchar(255),
    plate_column integer,
    plate_row varchar(255),
    sample_barcode varchar(255),
    sample_description varchar(255),
    sample_group_db_id varchar(255),
    sample_name varchar(255),
    samplepui varchar(255),
    sample_timestamp timestamp without time zone,
    sample_type varchar(255),
    taken_by varchar(255),
    tissue_type varchar(255),
    volume varchar(255),
    well varchar(255),
    observation_unit_id varchar(255),
    plate_id varchar(255),
    program_id varchar(255),
    study_id varchar(255),
    taxon_id_id varchar(255),
    trial_id varchar(255)
);
```

### sample_additional_info
```sql
CREATE TABLE sample_additional_info (
    sample_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### sample_external_references
```sql
CREATE TABLE sample_external_references (
    sample_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### scale
```sql
CREATE TABLE scale (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    data_type integer,
    decimal_places integer,
    scale_name varchar(255),
    scalepui varchar(255),
    units varchar(255),
    valid_value_max varchar(255),
    valid_value_min varchar(255),
    ontology_id varchar(255)
);
```

### scale_additional_info
```sql
CREATE TABLE scale_additional_info (
    scale_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### scale_entity_valid_value_categories
```sql
CREATE TABLE scale_entity_valid_value_categories (
    scale_entity_id character varying(255) NOT NULL,
    valid_value_categories character varying(255)
);
```

### scale_external_references
```sql
CREATE TABLE scale_external_references (
    scale_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### scale_ontology_reference
```sql
CREATE TABLE scale_ontology_reference (
    scale_entity_id varchar(255) NOT NULL,
    ontology_reference_id varchar(255) NOT NULL
);
```

### scale_valid_value_category
```sql
CREATE TABLE scale_valid_value_category (
    id varchar(255) NOT NULL,
    label varchar(255),
    value varchar(255),
    scale_id varchar(255)
);
```

### search
```sql
CREATE TABLE search (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    parameters text,
    request_type integer,
    response_countdown integer
);
```

### search_additional_info
```sql
CREATE TABLE search_additional_info (
    search_request_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### search_external_references
```sql
CREATE TABLE search_external_references (
    search_request_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### season
```sql
CREATE TABLE season (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    season varchar(255),
    year integer
);
```

### season_additional_info
```sql
CREATE TABLE season_additional_info (
    season_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### season_external_references
```sql
CREATE TABLE season_external_references (
    season_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### seed_lot
```sql
CREATE TABLE seed_lot (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    amount numeric(19,2),
    created_date timestamp without time zone,
    description varchar(255),
    last_updated timestamp without time zone,
    name varchar(255),
    source_collection varchar(255),
    storage_location varchar(255),
    units varchar(255),
    location_id varchar(255),
    program_id varchar(255)
);
```

### seed_lot_additional_info
```sql
CREATE TABLE seed_lot_additional_info (
    seed_lot_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### seed_lot_content_mixture
```sql
CREATE TABLE seed_lot_content_mixture (
    id varchar(255) NOT NULL,
    mixture_percentage integer,
    cross_id varchar(255),
    germplasm_id varchar(255),
    seed_lot_id varchar(255)
);
```

### seed_lot_external_references
```sql
CREATE TABLE seed_lot_external_references (
    seed_lot_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### seed_lot_transaction
```sql
CREATE TABLE seed_lot_transaction (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    amount numeric(19,2),
    description varchar(255),
    "timestamp" timestamp without time zone,
    units varchar(255),
    from_seed_lot_id varchar(255),
    to_seed_lot_id varchar(255)
);
```

### seed_lot_transaction_additional_info
```sql
CREATE TABLE seed_lot_transaction_additional_info (
    seed_lot_transaction_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### seed_lot_transaction_external_references
```sql
CREATE TABLE seed_lot_transaction_external_references (
    seed_lot_transaction_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### study
```sql
CREATE TABLE study (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    active boolean,
    cultural_practices varchar(255),
    documentationurl varchar(255),
    end_date timestamp without time zone,
    license varchar(255),
    observation_units_description varchar(255),
    start_date timestamp without time zone,
    study_code varchar(255),
    study_description varchar(255),
    study_name varchar(255),
    studypui varchar(255),
    study_type varchar(255),
    crop_id varchar(255),
    location_id varchar(255),
    program_id varchar(255),
    trial_id varchar(255)
);
```

### study_additional_info
```sql
CREATE TABLE study_additional_info (
    study_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### study_contact
```sql
CREATE TABLE study_contact (
    study_db_id varchar(255) NOT NULL,
    person_db_id varchar(255) NOT NULL
);
```

### study_data_link
```sql
CREATE TABLE study_data_link (
    id varchar(255) NOT NULL,
    data_format varchar(255),
    description varchar(255),
    file_format varchar(255),
    name varchar(255),
    provenance varchar(255),
    scientific_type varchar(255),
    url varchar(255),
    version varchar(255),
    study_id varchar(255)
);
```

### study_environment_parameter
```sql
CREATE TABLE study_environment_parameter (
    id varchar(255) NOT NULL,
    description varchar(255),
    parameter_name varchar(255),
    parameterpui varchar(255),
    unit varchar(255),
    unitpui varchar(255),
    value varchar(255),
    valuepui varchar(255),
    study_id varchar(255)
);
```

### study_experimental_design
```sql
CREATE TABLE study_experimental_design (
    id varchar(255) NOT NULL,
    pui varchar(255),
    description varchar(255),
    study_id varchar(255)
);
```

### study_external_references
```sql
CREATE TABLE study_external_references (
    study_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### study_growth_facility
```sql
CREATE TABLE study_growth_facility (
    id varchar(255) NOT NULL,
    pui varchar(255),
    description varchar(255),
    study_id varchar(255)
);
```

### study_last_update
```sql
CREATE TABLE study_last_update (
    id varchar(255) NOT NULL,
    "timestamp" timestamp without time zone,
    version varchar(255),
    study_id varchar(255)
);
```

### study_marker_profile
```sql
CREATE TABLE study_marker_profile (
    marker_profile_db_id character varying(255) NOT NULL,
    study_db_id character varying(255) NOT NULL
);
```

### study_observation_level
```sql
CREATE TABLE study_observation_level (
    id varchar(255) NOT NULL,
    level_name varchar(255),
    level_order integer,
    study_id varchar(255)
);
```

### study_season
```sql
CREATE TABLE study_season (
    study_db_id varchar(255) NOT NULL,
    season_db_id varchar(255) NOT NULL
);
```

### study_type
```sql
CREATE TABLE study_type (
    id character varying(255) NOT NULL,
    description character varying(255),
    name character varying(255)
);
```

### study_variable
```sql
CREATE TABLE study_variable (
    study_db_id varchar(255) NOT NULL,
    variable_db_id varchar(255) NOT NULL
);
```

### taxon
```sql
CREATE TABLE taxon (
    id character varying(255) NOT NULL,
    source_name character varying(255),
    taxon_id character varying(255)
);
```

### trait
```sql
CREATE TABLE trait (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    attribute varchar(255),
    attributepui varchar(255),
    entity varchar(255),
    entitypui varchar(255),
    main_abbreviation varchar(255),
    status varchar(255),
    trait_class varchar(255),
    trait_description varchar(255),
    trait_name varchar(255),
    traitpui varchar(255),
    ontology_id varchar(255)
);
```

### trait_abbreviation
```sql
CREATE TABLE trait_abbreviation (
    id varchar(255) NOT NULL,
    abbreviation varchar(255),
    trait_id varchar(255)
);
```

### trait_additional_info
```sql
CREATE TABLE trait_additional_info (
    trait_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### trait_entity_alternative_abbreviations
```sql
CREATE TABLE trait_entity_alternative_abbreviations (
    trait_entity_id varchar(255) NOT NULL,
    alternative_abbreviations varchar(255)
);
```

### trait_entity_synonyms
```sql
CREATE TABLE trait_entity_synonyms (
    trait_entity_id varchar(255) NOT NULL,
    synonyms varchar(255)
);
```

### trait_external_references
```sql
CREATE TABLE trait_external_references (
    trait_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### trait_ontology_reference
```sql
CREATE TABLE trait_ontology_reference (
    trait_entity_id varchar(255) NOT NULL,
    ontology_reference_id varchar(255) NOT NULL
);
```

### trait_synonym
```sql
CREATE TABLE trait_synonym (
    id varchar(255) NOT NULL,
    synonym varchar(255),
    trait_id varchar(255)
);
```

### treatment
```sql
CREATE TABLE treatment (
    id character varying(255) NOT NULL,
    factor character varying(255),
    modality character varying(255),
    observation_unit_db_id character varying(255)
);
```

### trial
```sql
CREATE TABLE trial (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    active boolean,
    documentationurl varchar(255),
    end_date timestamp without time zone,
    start_date timestamp without time zone,
    trial_description varchar(255),
    trial_name varchar(255),
    trialpui varchar(255),
    crop_id varchar(255),
    program_id varchar(255)
);
```

### trial_additional_info
```sql
CREATE TABLE trial_additional_info (
    trial_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### trial_contact
```sql
CREATE TABLE trial_contact (
    trial_db_id varchar(255) NOT NULL,
    person_db_id varchar(255) NOT NULL
);
```

### trial_dataset_authorship
```sql
CREATE TABLE trial_dataset_authorship (
    id varchar(255) NOT NULL,
    datasetpui varchar(255),
    license varchar(255),
    public_release_date timestamp without time zone,
    submission_date timestamp without time zone,
    trial_id varchar(255)
);
```

### trial_external_references
```sql
CREATE TABLE trial_external_references (
    trial_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### trial_publication
```sql
CREATE TABLE trial_publication (
    id varchar(255) NOT NULL,
    publicationpui varchar(255),
    publication_reference varchar(255),
    trial_id varchar(255)
);
```

### variable_base_entity
```sql
CREATE TABLE variable_base_entity (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    default_value varchar(255),
    documentationurl varchar(255),
    growth_stage varchar(255),
    institution varchar(255),
    language varchar(255),
    scientist varchar(255),
    status varchar(255),
    submission_timestamp timestamp without time zone,
    crop_id varchar(255),
    method_id varchar(255),
    ontology_id varchar(255),
    scale_id varchar(255),
    trait_id varchar(255)
);
```

### variable_base_entity_additional_info
```sql
CREATE TABLE variable_base_entity_additional_info (
    variable_base_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### variable_base_entity_context_of_use
```sql
CREATE TABLE variable_base_entity_context_of_use (
    variable_base_entity_id varchar(255) NOT NULL,
    context_of_use varchar(255)
);
```

### variable_base_entity_external_references
```sql
CREATE TABLE variable_base_entity_external_references (
    variable_base_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### variable_base_entity_ontology_reference
```sql
CREATE TABLE variable_base_entity_ontology_reference (
    variable_base_entity_id varchar(255) NOT NULL,
    ontology_reference_id varchar(255) NOT NULL
);
```

### variable_base_entity_synonyms
```sql
CREATE TABLE variable_base_entity_synonyms (
    variable_base_entity_id varchar(255) NOT NULL,
    synonyms varchar(255)
);
```

### variant
```sql
CREATE TABLE variant (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    created timestamp without time zone,
    variant_end integer,
    filters_applied boolean,
    filters_passed boolean,
    reference_bases varchar(255),
    variant_start integer,
    svlen integer,
    updated timestamp without time zone,
    variant_name varchar(255),
    variant_type varchar(255),
    reference_set_id varchar(255),
    variant_set_id varchar(255)
);
```

### variant_additional_info
```sql
CREATE TABLE variant_additional_info (
    variant_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### variant_entity_alternate_bases
```sql
CREATE TABLE variant_entity_alternate_bases (
    variant_entity_id varchar(255) NOT NULL,
    alternate_bases varchar(255)
);
```

### variant_entity_ciend
```sql
CREATE TABLE variant_entity_ciend (
    variant_entity_id varchar(255) NOT NULL,
    ciend integer
);
```

### variant_entity_cipos
```sql
CREATE TABLE variant_entity_cipos (
    variant_entity_id varchar(255) NOT NULL,
    cipos integer
);
```

### variant_entity_filters_failed
```sql
CREATE TABLE variant_entity_filters_failed (
    variant_entity_id varchar(255) NOT NULL,
    filters_failed varchar(255)
);
```

### variant_external_references
```sql
CREATE TABLE variant_external_references (
    variant_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### variant_set_analysis_entity_software
```sql
CREATE TABLE variant_set_analysis_entity_software (
    variant_set_analysis_entity_id varchar(255) NOT NULL,
    software varchar(255)
);
```

### variantset
```sql
CREATE TABLE variantset (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    variant_set_name varchar(255),
    reference_set_id varchar(255),
    study_id varchar(255)
);
```

### variantset_additional_info
```sql
CREATE TABLE variantset_additional_info (
    variant_set_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### variantset_analysis
```sql
CREATE TABLE variantset_analysis (
    id varchar(255) NOT NULL,
    analysis_name varchar(255),
    created timestamp without time zone,
    description varchar(255),
    type varchar(255),
    updated timestamp without time zone,
    variant_set_id varchar(255)
);
```

### variantset_external_references
```sql
CREATE TABLE variantset_external_references (
    variant_set_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### variantset_format
```sql
CREATE TABLE variantset_format (
    id varchar(255) NOT NULL,
    data_format integer,
    expand_homozygotes boolean,
    file_format integer,
    fileurl varchar(255),
    sep_phased varchar(255),
    sep_unphased varchar(255),
    unknown_string varchar(255),
    variant_set_id varchar(255)
);
```

### vendor_file
```sql
CREATE TABLE vendor_file (
    id varchar(255) NOT NULL,
    url varchar(255),
    file_type varchar(255),
    filename varchar(255),
    md5sum varchar(255),
    order_id varchar(255)
);
```

### vendor_file_sample
```sql
CREATE TABLE vendor_file_sample (
    verndor_file_dbid varchar(255) NOT NULL,
    sample_dbid varchar(255) NOT NULL
);
```

### vendor_order
```sql
CREATE TABLE vendor_order (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    client_plate_barcode varchar(255),
    client_plate_db_id varchar(255),
    sample_type integer,
    status integer,
    status_time_stamp timestamp without time zone
);
```

### vendor_order_additional_info
```sql
CREATE TABLE vendor_order_additional_info (
    vendor_order_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### vendor_order_entity_required_service_info
```sql
CREATE TABLE vendor_order_entity_required_service_info (
    vendor_order_entity_id varchar(255) NOT NULL,
    required_service_info varchar(255),
    required_service_info_key varchar(255) NOT NULL
);
```

### vendor_order_entity_service_ids
```sql
CREATE TABLE vendor_order_entity_service_ids (
    vendor_order_entity_id varchar(255) NOT NULL,
    service_ids varchar(255)
);
```

### vendor_order_external_references
```sql
CREATE TABLE vendor_order_external_references (
    vendor_order_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### vendor_spec
```sql
CREATE TABLE vendor_spec (
    id varchar(255) NOT NULL,
    auth_user_id varchar(255),
    contact_name varchar(255),
    vendor_address varchar(255),
    vendor_city varchar(255),
    vendor_country varchar(255),
    vendor_description varchar(255),
    vendor_email varchar(255),
    vendor_name varchar(255),
    vendor_phone varchar(255),
    vendorurl varchar(255)
);
```

### vendor_spec_additional_info
```sql
CREATE TABLE vendor_spec_additional_info (
    vendor_spec_entity_id varchar(255) NOT NULL,
    additional_info_id varchar(255) NOT NULL
);
```

### vendor_spec_deliverable
```sql
CREATE TABLE vendor_spec_deliverable (
    id varchar(255) NOT NULL,
    description varchar(255),
    format varchar(255),
    name varchar(255),
    vendor_spec_platform_db_id varchar(255)
);
```

### vendor_spec_external_references
```sql
CREATE TABLE vendor_spec_external_references (
    vendor_spec_entity_id varchar(255) NOT NULL,
    external_references_id varchar(255) NOT NULL
);
```

### vendor_spec_input_format
```sql
CREATE TABLE vendor_spec_input_format (
    id varchar(255) NOT NULL,
    input_format varchar(255),
    vendor_spec_standard_requirement_db_id varchar(255)
);
```

### vendor_spec_platform
```sql
CREATE TABLE vendor_spec_platform (
    id varchar(255) NOT NULL,
    contact_email varchar(255),
    contact_name varchar(255),
    contact_phone varchar(255),
    platform_description varchar(255),
    platform_name varchar(255),
    platformurl varchar(255),
    shipping_address varchar(255),
    specific_requirements varchar(255),
    taxonomy_id_system_name varchar(255),
    taxonomy_id_systemuri varchar(255),
    tissue_id_system_name varchar(255),
    tissue_id_systemuri varchar(255),
    vendor_spec_db_id varchar(255),
    standard_requirements_id varchar(255)
);
```

### vendor_spec_requirement
```sql
CREATE TABLE vendor_spec_requirement (
    id varchar(255) NOT NULL,
    input_format_details varchar(255),
    max_concentration varchar(255),
    max_volume varchar(255),
    min_concentration varchar(255),
    min_sample_number varchar(255),
    min_volume varchar(255),
    plate_orientation varchar(255),
    sample_type_details varchar(255)
);
```

### vendor_spec_sample_type
```sql
CREATE TABLE vendor_spec_sample_type (
    id varchar(255) NOT NULL,
    sample_type varchar(255),
    vendor_spec_standard_requirement_db_id varchar(255)
);
```

### vendor_spec_status
```sql
CREATE TABLE vendor_spec_status (
    id varchar(255) NOT NULL,
    status_description varchar(255),
    status_name varchar(255),
    vendor_spec_platform_db_id varchar(255)
);
```

### vendor_spec_well_position
```sql
CREATE TABLE vendor_spec_well_position (
    id varchar(255) NOT NULL,
    "position" varchar(255),
    vendor_spec_standard_requirement_db_id varchar(255)
);
```


