accessions

0 rows


Description

Information about batches of seeds. An accession is a batch of seeds of the same species collected in the same time and place by the same people.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int8 19 null
batches.accession_id batches_accession_id_fkeyN
accession_collectors.accession_id accession_collectors_accession_id_fkeyC
accession_photos.accession_id accession_photo_accession_id_fkeyR
accession_quantity_history.accession_id accession_quantity_history_accession_id_fkeyC
accession_state_history.accession_id accession_state_history_accession_id_fkeyC
bags.accession_id bags_accession_id_fkeyC
geolocations.accession_id geolocations_accession_id_fkeyC
viability_tests.accession_id viability_tests_accession_id_fkeyC
withdrawals.accession_id withdrawals_accession_id_fkeyC
facility_id int8 19 null
facilities.id accessions_facility_id_fkeyC
number text 2147483647 null

Displayed as the accession number to the user.

collected_date date 13 null
received_date date 13 null
state_id int4 10 null
accession_states.id accession_state_id_fkeyR
founder_id text 2147483647 null
trees_collected_from int4 10 null
subset_weight numeric 131089 null
subset_count int4 10 null
est_seed_count int4 10 null
drying_end_date date 13 null
processing_notes text 2147483647 null
sub_location_id int8 19 null
sub_locations.id accession_storage_location_id_fkeyR
created_time timestamptz 35,6 null
collection_site_name text 2147483647 null
collection_site_landowner text 2147483647 null
total_viability_percent int4 10 null

Percentage of viable seeds across all tests.

remaining_grams numeric 131089 null
remaining_quantity numeric 131089 null
remaining_units_id int4 10 null
seed_quantity_units.id accession_remaining_units_id_fkeyR
subset_weight_grams numeric 131089 null
subset_weight_quantity numeric 131089 null
subset_weight_units_id int4 10 null
seed_quantity_units.id accession_subset_weight_units_id_fkeyR
modified_time timestamptz 35,6 now()
created_by int8 19 null
users.id accessions_created_by_fkeyR
modified_by int8 19 null
users.id accessions_modified_by_fkeyR
species_id int8 19 null
species.id accessions_species_id_fkeyR
collection_site_city text 2147483647 null
collection_site_country_code text 2147483647 null
countries.code accessions_collection_site_country_code_fkeyR
collection_site_country_subdivision text 2147483647 null
collection_site_notes text 2147483647 null
collection_source_id int4 10 null
collection_sources.id accessions_collection_source_id_fkeyR
data_source_id int4 10 null
data_sources.id accessions_data_source_id_fkeyR
latest_observed_quantity numeric 131089 null

Most recent remaining quantity as observed by the user.

latest_observed_units_id int4 10 null
seed_quantity_units.id accessions_latest_observed_units_id_fkeyR

Measurement units of observed_quantity.

latest_observed_time timestamptz 35,6 null

Time of most recent change to observed quantity.

est_weight_grams numeric 131089 null
est_weight_quantity numeric 131089 null
est_weight_units_id int4 10 null
seed_quantity_units.id accessions_est_weight_units_id_fkeyR
total_withdrawn_count int4 10 null

Total number of seeds withdrawn. May be an estimate if withdrawals were measured by weight.

total_withdrawn_weight_grams numeric 131089 null
total_withdrawn_weight_quantity numeric 131089 null

Total weight of seeds withdrawn. May be an estimate if withdrawals were measured by seed count.

total_withdrawn_weight_units_id int4 10 null
seed_quantity_units.id accessions_total_withdrawn_weight_units_id_fkeyR

Measurement units of total_withdrawn_weight_quantity.

project_id int8 19 null
projects.id accessions_project_id_fkeyN

Indexes

Constraint Name Type Sort Column(s)
accession_pkey Primary key Asc id
accession__number_trgm Performance Asc number
accession__received_date_ix Performance Asc received_date
accession_created_time_idx Performance Asc created_time
accession_number_facility_unique Must be unique Asc/Asc number + facility_id
accessions__facility_id_ix Performance Asc facility_id
accessions__species_id_ix Performance Asc species_id
accessions_project_id_idx Performance Asc project_id

Check Constraints

Constraint Name Constraint
observed_quantity_must_have_units ((((latest_observed_quantity IS NOT NULL) AND (latest_observed_units_id IS NOT NULL)) OR ((latest_observed_quantity IS NULL) AND (latest_observed_units_id IS NULL))))
accessions_collection_site_name_check ((collection_site_name !~ similar_to_escape(' *'::text)))
accessions_collection_site_country_subdivision_check ((collection_site_country_subdivision !~ similar_to_escape(' *'::text)))
accessions_collection_site_landowner_check ((collection_site_landowner !~ similar_to_escape(' *'::text)))
observed_quantity_must_have_time ((((latest_observed_quantity IS NOT NULL) AND (latest_observed_time IS NOT NULL)) OR ((latest_observed_quantity IS NULL) AND (latest_observed_time IS NULL))))
remaining_quantity_must_have_units ((((remaining_quantity IS NOT NULL) AND (remaining_units_id IS NOT NULL)) OR ((remaining_quantity IS NULL) AND (remaining_units_id IS NULL))))
accessions_number_check ((number !~ similar_to_escape(' *'::text)))
accessions_collection_site_city_check ((collection_site_city !~ similar_to_escape(' *'::text)))
subset_weight_units_must_not_be_seeds (((subset_weight_units_id <> 1) OR (subset_weight_units_id IS NULL)))
accessions_collection_site_country_code_check ((collection_site_country_code !~ similar_to_escape(' *'::text)))
accessions_processing_notes_check ((processing_notes !~ similar_to_escape(' *'::text)))
subset_weight_quantity_must_have_units ((((subset_weight_quantity IS NOT NULL) AND (subset_weight_units_id IS NOT NULL)) OR ((subset_weight_quantity IS NULL) AND (subset_weight_units_id IS NULL))))
accessions_collection_site_notes_check ((collection_site_notes !~ similar_to_escape(' *'::text)))
accessions_founder_id_check ((founder_id !~ similar_to_escape(' *'::text)))

Relationships