1 Project qiita Layout qiita Hint: Read the column comments as mouse-over tooltips. Generated using DbSchema Group_analyses Group_users Group_study Group_vocabularies Group_ontology Group_logging Group_filepaths Group_collection Foreign Key fk_controlled_vocab_values controlled_vocab_values references controlled_vocab ( controlled_vocab_id ) controlled_vocab_id Foreign Key fk_investigation_study investigation_study references investigation ( investigation_id ) investigation_id Foreign Key fk_investigation_study_study investigation_study references study ( study_id ) study_id Foreign Key fk_job_results_filepath job_results_filepath references job ( job_id ) job_id Foreign Key fk_job_results_filepath_0 job_results_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_analysis_job_analysis analysis_job references analysis ( analysis_id ) analysis_id Foreign Key fk_analysis_job_job analysis_job references job ( job_id ) job_id Foreign Key fk_analysis_chain analysis_chain references analysis ( parent_id -> analysis_id ) parent_id Foreign Key fk_analysis_chain_0 analysis_chain references analysis ( child_id -> analysis_id ) child_id Foreign Key fk_column_controlled_vocabularies column_controlled_vocabularies references mixs_field_description ( column_name ) column_name Foreign Key fk_column_controlled_vocab2 column_controlled_vocabularies references controlled_vocab ( controlled_vocab_id ) controlled_vocab_id Foreign Key fk_analysis_users_analysis analysis_users references analysis ( analysis_id ) analysis_id Foreign Key fk_analysis_users_user analysis_users references qiita_user ( email ) email Foreign Key fk_study_preprocessed_data study_preprocessed_data references study ( study_id ) study_id Foreign Key fk_study_preprocessed_data_0 study_preprocessed_data references preprocessed_data ( preprocessed_data_id ) preprocessed_data_id Foreign Key fk_study_users_study study_users references study ( study_id ) study_id Foreign Key fk_study_users_user study_users references qiita_user ( email ) email Foreign Key fk_study_raw_data_study study_raw_data references study ( study_id ) study_id Foreign Key fk_study_raw_data_raw_data study_raw_data references raw_data ( raw_data_id ) raw_data_id Foreign Key fk_processed_data_filepath processed_filepath references processed_data ( processed_data_id ) processed_data_id Foreign Key fk_processed_data_filepath_0 processed_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_logging_severity logging references severity ( severity_id ) severity_id Foreign Key fk_study_processed_data study_processed_data references study ( study_id ) study_id Foreign Key fk_study_processed_data_0 study_processed_data references processed_data ( processed_data_id ) processed_data_id Foreign Key fk_command_data_type command_data_type references command ( command_id ) command_id Foreign Key fk_command_data_type_0 command_data_type references data_type ( data_type_id ) data_type_id Foreign Key fk_preprocessed_filepath preprocessed_filepath references preprocessed_data ( preprocessed_data_id ) preprocessed_data_id Foreign Key fk_preprocessed_filepath_0 preprocessed_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_analysis_filepath analysis_filepath references analysis ( analysis_id ) analysis_id Foreign Key fk_analysis_filepath_0 analysis_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_analysis_filepath_1 analysis_filepath references data_type ( data_type_id ) data_type_id Foreign Key fk_analysis_workflow analysis_workflow references analysis ( analysis_id ) analysis_id Foreign Key fk_column_ontology column_ontology references mixs_field_description ( column_name ) column_name Foreign Key fk_processed_params_uclust processed_params_uclust references reference ( reference_id ) reference_id Foreign Key fk_preprocessed_processed_data preprocessed_processed_data references preprocessed_data ( preprocessed_data_id ) preprocessed_data_id Foreign Key fk_preprocessed_processed_data_0 preprocessed_processed_data references processed_data ( processed_data_id ) processed_data_id Foreign Key fk_user_user_level qiita_user references user_level ( user_level_id ) user_level_id Foreign Key fk_prep_columns_prep_template prep_columns references prep_template ( prep_template_id ) prep_template_id Foreign Key fk_raw_filepath raw_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_raw_filepath_0 raw_filepath references raw_data ( raw_data_id ) raw_data_id Foreign Key fk_prep_template_data_type prep_template references data_type ( data_type_id ) data_type_id Foreign Key fk_prep_template_raw_data prep_template references raw_data ( raw_data_id ) raw_data_id Foreign Key fk_raw_data_filetype raw_data references filetype ( filetype_id ) filetype_id Foreign Key fk_job_function job references command ( command_id ) command_id Foreign Key fk_job_job_status_id job references job_status ( job_status_id ) job_status_id Foreign Key fk_job_data_type job references data_type ( data_type_id ) data_type_id Foreign Key fk_job job references logging ( log_id -> logging_id ) log_id Foreign Key fk_filepath filepath references filepath_type ( filepath_type_id ) filepath_type_id Foreign Key fk_filepath_0 filepath references checksum_algorithm ( checksum_algorithm_id ) checksum_algorithm_id Foreign Key fk_filepath_data_directory filepath references data_directory ( data_directory_id ) data_directory_id Foreign Key fk_term_ontology term references ontology ( ontology_id ) ontology_id Foreign Key fk_study_environmental_package study_environmental_package references study ( study_id ) study_id Foreign Key fk_study_environmental_package_0 study_environmental_package references environmental_package ( environmental_package_name ) environmental_package_name Foreign Key fk_filepath_id prep_template_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_prep_template_id prep_template_filepath references prep_template ( prep_template_id ) prep_template_id Foreign Key fk_study_id sample_template_filepath references study ( study_id ) study_id Foreign Key fk_filepath_id sample_template_filepath references filepath ( filepath_id ) filepath_id Foreign Key fk_prep_template_id prep_template_preprocessed_data references prep_template ( prep_template_id ) prep_template_id Foreign Key fk_prep_template_preprocessed_data prep_template_preprocessed_data references preprocessed_data ( preprocessed_data_id ) preprocessed_data_id Foreign Key fk_reference_sequence_filepath reference references filepath ( sequence_filepath -> filepath_id ) sequence_filepath Foreign Key fk_processed_params_sortmerna processed_params_sortmerna references reference ( reference_id ) reference_id Foreign Key fk_collection_job collection_job references collection ( collection_id ) collection_id Foreign Key fk_collection_job_0 collection_job references job ( job_id ) job_id Foreign Key fk_collection_analysis collection_analysis references collection ( collection_id ) collection_id Foreign Key fk_collection_analysis_0 collection_analysis references analysis ( analysis_id ) analysis_id Foreign Key fk_collection collection references qiita_user ( email ) email Foreign Key fk_collection_0 collection references collection_status ( collection_status_id ) collection_status_id Foreign Key fk_collection_user collection_users references collection ( collection_id ) collection_id Foreign Key fk_collection_user_email collection_users references qiita_user ( email ) email Foreign Key fk_study_mapping_columns_study study_sample_columns references study ( study_id ) study_id Foreign Key fk_analysis_user analysis references qiita_user ( email ) email Foreign Key fk_analysis_analysis_status analysis references analysis_status ( analysis_status_id ) analysis_status_id Foreign Key fk_study_experimental_factor study_experimental_factor references study ( study_id ) study_id Foreign Key fk_study_pmid_study study_pmid references study ( study_id ) study_id Foreign Key fk_study_user study references qiita_user ( email ) email Foreign Key fk_study_study_emp_person study references study_person ( emp_person_id -> study_person_id ) emp_person_id Foreign Key fk_study_study_lab_person study references study_person ( lab_person_id -> study_person_id ) lab_person_id Foreign Key fk_study_study_pi_person study references study_person ( principal_investigator_id -> study_person_id ) principal_investigator_id Foreign Key fk_study_timeseries_type study references timeseries_type ( timeseries_type_id ) timeseries_type_id Foreign Key fk_study study references portal_type ( portal_type_id ) portal_type_id Foreign Key fk_processed_data processed_data references data_type ( data_type_id ) data_type_id Foreign Key fk_processed_data_status processed_data references processed_data_status ( processed_data_status_id ) processed_data_status_id Foreign Key fk_investigation_study_person investigation references study_person ( contact_person_id -> study_person_id ) contact_person_id Foreign Key fk_analysis_sample_analysis analysis_sample references analysis ( analysis_id ) analysis_id Foreign Key fk_analysis_processed_data analysis_sample references processed_data ( processed_data_id ) processed_data_id Foreign Key fk_analysis_sample analysis_sample references study_sample ( sample_id ) sample_id Foreign Key fk_required_sample_info_study study_sample references study ( study_id ) study_id Foreign Key fk_common_prep_info prep_template_sample references study_sample ( sample_id ) sample_id Foreign Key fk_prep_template prep_template_sample references prep_template ( prep_template_id ) prep_template_id controlled_vocab_valuesTable qiita.controlled_vocab_values Primary Key ( vocab_value_id ) vocab_value_idvocab_value_id bigserial not null Index ( controlled_vocab_id ) controlled_vocab_idcontrolled_vocab_id bigint not null References controlled_vocab ( controlled_vocab_id ) termterm varchar not null order_byorder_by varchar not null default_itemdefault_item varchar investigation_studyTable qiita.investigation_study Primary Key ( investigation_id, study_id ) Index ( investigation_id ) investigation_idinvestigation_id bigint not null References investigation ( investigation_id ) Primary Key ( investigation_id, study_id ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) job_results_filepathTable qiita.job_results_filepath Holds connection between jobs and the result filepaths Primary Key ( job_id, filepath_id ) Index ( job_id ) job_idjob_id bigint not null References job ( job_id ) Primary Key ( job_id, filepath_id ) Index ( filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) analysis_jobTable qiita.analysis_job Holds information for a one-to-many relation of analysis to the jobs in it Primary Key ( analysis_id, job_id ) Index ( analysis_id ) analysis_idanalysis_id bigint not null Id of the analysis References analysis ( analysis_id ) Primary Key ( analysis_id, job_id ) Index ( job_id ) job_idjob_id bigint not null Id for a job that is part of the analysis References job ( job_id ) analysis_chainTable qiita.analysis_chain Keeps track of the chain of analysis edits. Tracks what previous analysis a given analysis came from.If a given analysis is not in child_id, it is the root of the chain. Index ( parent_id ) Primary Key ( parent_id, child_id ) parent_idparent_id bigint not null References analysis ( parent_id -> analysis_id ) Index ( child_id ) Primary Key ( parent_id, child_id ) child_idchild_id bigint not null References analysis ( child_id -> analysis_id ) column_controlled_vocabulariesTable qiita.column_controlled_vocabularies Table relates a column with a controlled vocabulary. Primary Key ( controlled_vocab_id, column_name ) Index ( controlled_vocab_id ) controlled_vocab_idcontrolled_vocab_id bigserial not null References controlled_vocab ( controlled_vocab_id ) Primary Key ( controlled_vocab_id, column_name ) Index ( column_name ) column_namecolumn_name varchar not null References mixs_field_description ( column_name ) mixs_field_descriptionTable qiita.mixs_field_description Primary Key ( column_name ) column_namecolumn_name varchar not null Referred by column_controlled_vocabularies ( column_name ) Referred by column_ontology ( column_name ) data_typedata_type varchar not null desc_or_valuedesc_or_value varchar not null definitiondefinition varchar not null min_lengthmin_length integer activeactive integer not null analysis_usersTable qiita.analysis_users Links analyses to the users they are shared with Primary Key ( analysis_id, email ) Index ( analysis_id ) analysis_idanalysis_id bigint not null References analysis ( analysis_id ) Primary Key ( analysis_id, email ) Index ( email ) emailemail varchar not null References qiita_user ( email ) study_preprocessed_dataTable qiita.study_preprocessed_data Primary Key ( study_id, preprocessed_data_id ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, preprocessed_data_id ) Index ( preprocessed_data_id ) preprocessed_data_idpreprocessed_data_id bigint not null References preprocessed_data ( preprocessed_data_id ) study_usersTable qiita.study_users Links shared studies to users they are shared with Primary Key ( study_id, email ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, email ) Index ( email ) emailemail varchar not null References qiita_user ( email ) sample_xTable qiita.sample_x data for samples in study x (sample template)x is the study_id from study tableMAKE SURE sample_id IS FK TO sample_id IN required_sample_info TABLE Primary Key ( sample_id ) sample_idsample_id varchar not null descriptiondescription varchar not null other_mapping_columnsother_mapping_columns varchar Represents whatever other columns go with this study study_raw_dataTable qiita.study_raw_data links study to its raw data Index ( study_id ) Primary Key ( study_id, raw_data_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, raw_data_id ) raw_data_idraw_data_id bigint not null References raw_data ( raw_data_id ) processed_filepathTable qiita.processed_filepath Primary Key ( processed_data_id, filepath_id ) processed_data_idprocessed_data_id bigint not null References processed_data ( processed_data_id ) Primary Key ( processed_data_id, filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) commandTable qiita.command Available commands for jobs Primary Key ( command_id ) command_idcommand_id bigserial not null Unique identifier for function Referred by command_data_type ( command_id ) Referred by job ( command_id ) namename varchar not null commandcommand varchar not null What command to call to run this function inputinput varchar not null JSON of input options for the command requiredrequired varchar not null JSON of required options for the command optionaloptional varchar not null JSON of optional options for command outputoutput varchar not null JSON of output options for the command loggingTable qiita.logging Primary Key ( logging_id ) logging_idlogging_id bigserial not null Referred by job ( log_id -> logging_id ) timetime timestamp not null Time the error was thrown Index ( severity_id ) severity_idseverity_id integer not null References severity ( severity_id ) msgmsg varchar not null Error message thrown informationinformation varchar Other applicable information (depending on error) study_processed_dataTable qiita.study_processed_data Primary Key ( study_id, processed_data_id ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, processed_data_id ) Unique Index ( processed_data_id ) processed_data_idprocessed_data_id bigint not null References processed_data ( processed_data_id ) command_data_typeTable qiita.command_data_type Primary Key ( command_id, data_type_id ) Index ( command_id ) command_idcommand_id bigint not null References command ( command_id ) Primary Key ( command_id, data_type_id ) Index ( data_type_id ) data_type_iddata_type_id bigint not null References data_type ( data_type_id ) preprocessed_filepathTable qiita.preprocessed_filepath Primary Key ( preprocessed_data_id, filepath_id ) Index ( preprocessed_data_id ) preprocessed_data_idpreprocessed_data_id bigint not null References preprocessed_data ( preprocessed_data_id ) Primary Key ( preprocessed_data_id, filepath_id ) Index ( filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) analysis_filepathTable qiita.analysis_filepath Stores link between analysis and the data file used for the analysis. Index ( analysis_id ) Primary Key ( analysis_id, filepath_id ) analysis_idanalysis_id bigint not null References analysis ( analysis_id ) Index ( filepath_id ) Primary Key ( analysis_id, filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) Index ( data_type_id ) data_type_iddata_type_id bigint References data_type ( data_type_id ) analysis_workflowTable qiita.analysis_workflow Stores what step in_production analyses are on. Primary Key ( analysis_id ) analysis_idanalysis_id bigint not null References analysis ( analysis_id ) stepstep integer not null column_ontologyTable qiita.column_ontology This table relates a column with an ontology. Primary Key ( column_name, ontology_short_name ) Index ( column_name ) column_namecolumn_name varchar not null References mixs_field_description ( column_name ) Primary Key ( column_name, ontology_short_name ) ontology_short_nameontology_short_name varchar not null bioportal_idbioportal_id integer not null ontology_branch_idontology_branch_id varchar study_personTable qiita.study_person Contact information for the various people involved in a study Primary Key ( study_person_id ) study_person_idstudy_person_id bigserial not null Referred by investigation ( contact_person_id -> study_person_id ) Referred by study ( emp_person_id -> study_person_id ) Referred by study ( lab_person_id -> study_person_id ) Referred by study ( principal_investigator_id -> study_person_id ) Unique Index ( name, affiliation ) namename varchar not null emailemail varchar not null Unique Index ( name, affiliation ) affiliationaffiliation varchar not null The institution with which this person is affiliated addressaddress varchar(100) phonephone varchar controlled_vocabTable qiita.controlled_vocab Primary Key ( controlled_vocab_id ) controlled_vocab_idcontrolled_vocab_id bigserial not null Referred by column_controlled_vocabularies ( controlled_vocab_id ) Referred by controlled_vocab_values ( controlled_vocab_id ) controlled_vocabcontrolled_vocab varchar not null ontologyTable qiita.ontology Primary Key ( ontology_id ) ontology_idontology_id bigint not null Referred by term ( ontology_id ) Unique Index ( ontology ) ontologyontology varchar not null fully_loadedfully_loaded bool not null fullnamefullname varchar query_urlquery_url varchar source_urlsource_url varchar definitiondefinition text load_dateload_date date not null preprocessed_spectra_paramsTable qiita.preprocessed_spectra_params Parameters used for processing spectra data. Primary Key ( preprocessed_params_id ) preprocessed_params_idpreprocessed_params_id bigserial not null colcol varchar processed_params_uclustTable qiita.processed_params_uclust Parameters used for processing data using method uclust Primary Key ( processed_params_id ) processed_params_idprocessed_params_id bigserial not null Index ( reference_id ) reference_idreference_id bigint not null What version of reference or type of reference used References reference ( reference_id ) similaritysimilarity float8 not null default 0.97 enable_rev_strand_matchenable_rev_strand_match bool not null default TRUE suppress_new_clusterssuppress_new_clusters bool not null default TRUE preprocessed_processed_dataTable qiita.preprocessed_processed_data Primary Key ( preprocessed_data_id, processed_data_id ) Index ( preprocessed_data_id ) preprocessed_data_idpreprocessed_data_id bigint not null References preprocessed_data ( preprocessed_data_id ) Primary Key ( preprocessed_data_id, processed_data_id ) Index ( processed_data_id ) processed_data_idprocessed_data_id bigint not null References processed_data ( processed_data_id ) qiita_userTable qiita.qiita_user Holds all user information Primary Key ( email ) emailemail varchar not null Referred by analysis ( email ) Referred by analysis_users ( email ) Referred by collection ( email ) Referred by collection_users ( email ) Referred by study ( email ) Referred by study_users ( email ) Index ( user_level_id ) user_level_iduser_level_id integer not null default 5 user level References user_level ( user_level_id ) passwordpassword varchar not null namename varchar affiliationaffiliation varchar addressaddress varchar phonephone varchar user_verify_codeuser_verify_code varchar Code for initial user email verification pass_reset_codepass_reset_code varchar Randomly generated code for password reset pass_reset_timestamppass_reset_timestamp timestamp Time the reset code was generated prep_yTable qiita.prep_y Information on how raw data y was prepared (prep template)Linked by y being raw_data_id from raw data table. Primary Key ( sample_id ) sample_idsample_id varchar not null datadata bigint STUFFFFF prep_columnsTable qiita.prep_columns Primary Key ( prep_template_id, column_name, column_type ) Index ( prep_template_id ) prep_template_idprep_template_id bigint not null References prep_template ( prep_template_id ) Primary Key ( prep_template_id, column_name, column_type ) column_namecolumn_name varchar not null Primary Key ( prep_template_id, column_name, column_type ) column_typecolumn_type varchar not null raw_filepathTable qiita.raw_filepath Primary Key ( raw_data_id, filepath_id ) Index ( raw_data_id ) raw_data_idraw_data_id bigint not null References raw_data ( raw_data_id ) Primary Key ( raw_data_id, filepath_id ) Index ( filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) filetypeTable qiita.filetype Type of file (FASTA, FASTQ, SPECTRA, etc) Primary Key ( filetype_id ) filetype_idfiletype_id bigserial not null Referred by raw_data ( filetype_id ) Unique Index ( type ) typetype varchar not null filepath_typeTable qiita.filepath_type Primary Key ( filepath_type_id ) filepath_type_idfilepath_type_id bigserial not null Referred by filepath ( filepath_type_id ) Unique Index ( filepath_type ) filepath_typefilepath_type varchar checksum_algorithmTable qiita.checksum_algorithm Primary Key ( checksum_algorithm_id ) checksum_algorithm_idchecksum_algorithm_id bigserial not null Referred by filepath ( checksum_algorithm_id ) Unique Index ( name ) namename varchar not null data_typeTable qiita.data_type Primary Key ( data_type_id ) data_type_iddata_type_id bigserial not null Referred by analysis_filepath ( data_type_id ) Referred by command_data_type ( data_type_id ) Referred by job ( data_type_id ) Referred by prep_template ( data_type_id ) Referred by preprocessed_data ( data_type_id ) Referred by processed_data ( data_type_id ) Unique Index ( data_type ) data_typedata_type varchar not null Data type (16S, metabolome, etc) the job will use user_levelTable qiita.user_level Holds available user levels Primary Key ( user_level_id ) user_level_iduser_level_id serial not null Referred by qiita_user ( user_level_id ) Unique Index ( name ) namename varchar not null One of the user levels (admin, user, guest, etc) descriptiondescription text not null job_statusTable qiita.job_status Primary Key ( job_status_id ) job_status_idjob_status_id bigserial not null Referred by job ( job_status_id ) Unique Index ( status ) statusstatus varchar not null severityTable qiita.severity Primary Key ( severity_id ) severity_idseverity_id serial not null Referred by logging ( severity_id ) Unique Index ( severity ) severityseverity varchar not null prep_templateTable qiita.prep_template Primary Key ( prep_template_id ) prep_template_idprep_template_id bigserial not null Referred by prep_template_sample ( prep_template_id ) Referred by prep_columns ( prep_template_id ) Referred by prep_template_filepath ( prep_template_id ) Referred by prep_template_preprocessed_data ( prep_template_id ) Index ( data_type_id ) data_type_iddata_type_id bigint not null References data_type ( data_type_id ) Index ( raw_data_id ) raw_data_idraw_data_id bigint not null References raw_data ( raw_data_id ) preprocessing_statuspreprocessing_status varchar not null default 'not_preprocessed' investigation_typeinvestigation_type varchar The investigation type (e.g., one of the values from EBI's set of known types) raw_dataTable qiita.raw_data Unique Index ( raw_data_id ) Primary Key ( raw_data_id ) raw_data_idraw_data_id bigserial not null Referred by prep_template ( raw_data_id ) Referred by raw_filepath ( raw_data_id ) Referred by study_raw_data ( raw_data_id ) Index ( filetype_id ) filetype_idfiletype_id bigint not null References filetype ( filetype_id ) link_filepaths_statuslink_filepaths_status varchar not null default 'idle' jobTable qiita.job Primary Key ( job_id ) job_idjob_id bigserial not null Unique identifier for job Referred by analysis_job ( job_id ) Referred by collection_job ( job_id ) Referred by job_results_filepath ( job_id ) Index ( data_type_id ) data_type_iddata_type_id bigint not null What datatype (16s, metabolome, etc) job is run on. References data_type ( data_type_id ) Index ( job_status_id ) job_status_idjob_status_id bigint not null References job_status ( job_status_id ) Index ( command_id ) command_idcommand_id bigint not null The Qiime or other function being run (alpha diversity, etc) References command ( command_id ) optionsoptions varchar Holds all options set for the job as a json string Index ( log_id ) log_idlog_id bigint Reference to error if status is error References logging ( log_id -> logging_id ) filepathTable qiita.filepath Primary Key ( filepath_id ) filepath_idfilepath_id bigserial not null Referred by analysis_filepath ( filepath_id ) Referred by job_results_filepath ( filepath_id ) Referred by prep_template_filepath ( filepath_id ) Referred by preprocessed_filepath ( filepath_id ) Referred by processed_filepath ( filepath_id ) Referred by raw_filepath ( filepath_id ) Referred by reference ( sequence_filepath -> filepath_id ) Referred by reference ( taxonomy_filepath -> filepath_id ) Referred by reference ( tree_filepath -> filepath_id ) Referred by sample_template_filepath ( filepath_id ) filepathfilepath varchar not null Index ( filepath_type_id ) filepath_type_idfilepath_type_id bigint not null References filepath_type ( filepath_type_id ) checksumchecksum varchar not null checksum_algorithm_idchecksum_algorithm_id bigint not null References checksum_algorithm ( checksum_algorithm_id ) Index ( data_directory_id ) data_directory_iddata_directory_id bigserial References data_directory ( data_directory_id ) data_directoryTable qiita.data_directory Primary Key ( data_directory_id ) data_directory_iddata_directory_id bigserial not null Referred by filepath ( data_directory_id ) data_typedata_type varchar not null mountpointmountpoint varchar not null subdirectorysubdirectory varchar not null activeactive bool not null termTable qiita.term Primary Key ( term_id ) term_idterm_id bigserial not null Index ( ontology_id ) ontology_idontology_id bigint not null References ontology ( ontology_id ) old_term_idold_term_id bigint default NULL Identifier used in the old system, we are keeping this for consistency termterm varchar not null identifieridentifier varchar definitiondefinition varchar namespacenamespace varchar is_obsoleteis_obsolete bool default 'false' is_root_termis_root_term bool is_leafis_leaf bool user_defineduser_defined bool not null default False Whether or not this term was defined by a user environmental_packageTable qiita.environmental_package Primary Key ( environmental_package_name ) environmental_package_nameenvironmental_package_name varchar not null The name of the environmental package Referred by study_environmental_package ( environmental_package_name ) metadata_tablemetadata_table varchar not null Contains the name of the table that contains the pre-defined metadata columns for the environmental package study_environmental_packageTable qiita.study_environmental_package Holds the 1 to many relationship between the study and the environmental_package Primary Key ( study_id, environmental_package_name ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, environmental_package_name ) Index ( environmental_package_name ) environmental_package_nameenvironmental_package_name varchar not null References environmental_package ( environmental_package_name ) timeseries_typeTable qiita.timeseries_type Primary Key ( timeseries_type_id ) timeseries_type_idtimeseries_type_id bigserial not null Referred by study ( timeseries_type_id ) Unique Index ( timeseries_type, intervention_type ) timeseries_typetimeseries_type varchar not null Unique Index ( timeseries_type, intervention_type ) intervention_typeintervention_type varchar not null default 'None' prep_template_filepathTable qiita.prep_template_filepath Primary Key ( prep_template_id, filepath_id ) Index ( prep_template_id ) prep_template_idprep_template_id bigint not null References prep_template ( prep_template_id ) Primary Key ( prep_template_id, filepath_id ) Index ( filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) sample_template_filepathTable qiita.sample_template_filepath Primary Key ( study_id, filepath_id ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, filepath_id ) Index ( filepath_id ) filepath_idfilepath_id bigint not null References filepath ( filepath_id ) prep_template_preprocessed_dataTable qiita.prep_template_preprocessed_data Primary Key ( prep_template_id, preprocessed_data_id ) Index ( prep_template_id ) prep_template_idprep_template_id bigint not null References prep_template ( prep_template_id ) Primary Key ( prep_template_id, preprocessed_data_id ) Index ( preprocessed_data_id ) preprocessed_data_idpreprocessed_data_id bigint not null References preprocessed_data ( preprocessed_data_id ) preprocessed_dataTable qiita.preprocessed_data Primary Key ( preprocessed_data_id ) preprocessed_data_idpreprocessed_data_id bigserial not null Referred by prep_template_preprocessed_data ( preprocessed_data_id ) Referred by preprocessed_filepath ( preprocessed_data_id ) Referred by preprocessed_processed_data ( preprocessed_data_id ) Referred by study_preprocessed_data ( preprocessed_data_id ) preprocessed_params_tablepreprocessed_params_table varchar not null Name of table holding the params preprocessed_params_idpreprocessed_params_id bigint not null submitted_to_insdc_statussubmitted_to_insdc_status varchar not null default 'not submitted' ebi_submission_accessionebi_submission_accession varchar ebi_study_accessionebi_study_accession varchar Index ( data_type_id ) data_type_iddata_type_id bigint not null References data_type ( data_type_id ) link_filepaths_statuslink_filepaths_status varchar not null default 'idle' submitted_to_vamps_statussubmitted_to_vamps_status varchar default 'not submitted' processing_statusprocessing_status varchar not null default 'not_processed' referenceTable qiita.reference Primary Key ( reference_id ) reference_idreference_id bigserial not null Referred by processed_params_sortmerna ( reference_id ) Referred by processed_params_uclust ( reference_id ) reference_namereference_name varchar not null reference_versionreference_version varchar Index ( sequence_filepath ) sequence_filepathsequence_filepath bigint not null References filepath ( sequence_filepath -> filepath_id ) Index ( taxonomy_filepath ) taxonomy_filepathtaxonomy_filepath bigint References filepath ( taxonomy_filepath -> filepath_id ) Index ( tree_filepath ) tree_filepathtree_filepath bigint References filepath ( tree_filepath -> filepath_id ) preprocessed_sequence_454_paramsTable qiita.preprocessed_sequence_454_params Parameters used for processing sequence data. Primary Key ( preprocessed_params_id ) preprocessed_params_idpreprocessed_params_id bigserial not null param_set_nameparam_set_name varchar(100) not null The name of the parameter set min_seq_lenmin_seq_len integer not null default 200 The minimum sequence length max_seq_lenmax_seq_len integer not null default 1000 The maximum sequence length trim_seq_lengthtrim_seq_length bool not null default f Whether to trim the sequence length or not min_qual_scoremin_qual_score integer not null default 25 The minimum phred quality score max_ambigmax_ambig integer not null default 6 The maximum number of ambiguous characters max_homopolymermax_homopolymer integer not null default 6 The maximum homopolymer run max_primer_mismatchmax_primer_mismatch integer not null default 0 Maximum number of mismatches to the primer allowed barcode_typebarcode_type varchar not null default 'golay_12' The barcode type used max_barcode_errorsmax_barcode_errors real not null default 1.5 The maximum number of allowed barcode errors disable_bc_correctiondisable_bc_correction bool not null default f Disable barcode correction qual_score_windowqual_score_window integer not null default 0 Enable a sliding window quality score threshold, this is the size of the window disable_primersdisable_primers bool not null default f Disable primer checking reverse_primersreverse_primers varchar not null default 'disable' Check for reverse primers reverse_primer_mismatchesreverse_primer_mismatches integer not null default 0 The number of allowed mismatches in the reverse primer truncate_ambig_bases_booltruncate_ambig_bases_bool bool not null default f Truncate at the first ambiguous base preprocessed_sequence_illumina_paramsTable qiita.preprocessed_sequence_illumina_params Parameters used for processing illumina sequence data. Primary Key ( preprocessed_params_id ) preprocessed_params_idpreprocessed_params_id bigserial not null max_bad_run_lengthmax_bad_run_length integer not null default 3 min_per_read_length_fractionmin_per_read_length_fraction real not null default 0.75 sequence_max_nsequence_max_n integer not null default 0 rev_comp_barcoderev_comp_barcode bool not null default FALSE rev_comp_mapping_barcodesrev_comp_mapping_barcodes bool not null default FALSE rev_comprev_comp bool not null default FALSE phred_quality_thresholdphred_quality_threshold integer not null default 3 barcode_typebarcode_type varchar not null default 'golay_12' max_barcode_errorsmax_barcode_errors real not null default 1.5 param_set_nameparam_set_name varchar(100) not null The name of the parameter set processed_params_sortmernaTable qiita.processed_params_sortmerna Parameters used for processing data using method sortmerna Primary Key ( processed_params_id ) processed_params_idprocessed_params_id bigserial not null Index ( reference_id ) reference_idreference_id bigint not null What version of reference or type of reference used References reference ( reference_id ) sortmerna_e_valuesortmerna_e_value float8 not null sortmerna_max_possortmerna_max_pos integer not null similaritysimilarity float8 not null sortmerna_coveragesortmerna_coverage float8 not null threadsthreads integer not null param_set_nameparam_set_name varchar(100) not null default 'Default' The name of the parameter set analysis_statusTable qiita.analysis_status Primary Key ( analysis_status_id ) analysis_status_idanalysis_status_id bigserial not null Referred by analysis ( analysis_status_id ) Unique Index ( status ) statusstatus varchar not null collection_jobTable qiita.collection_job Matches collection important jobs as one to many. Index ( collection_id ) Primary Key ( collection_id, job_id ) collection_idcollection_id bigint not null References collection ( collection_id ) Index ( job_id ) Primary Key ( collection_id, job_id ) job_idjob_id bigint not null References job ( job_id ) collection_analysisTable qiita.collection_analysis Matches collection to analyses as one to many. Primary Key ( collection_id, analysis_id ) Index ( collection_id ) collection_idcollection_id bigint not null References collection ( collection_id ) Primary Key ( collection_id, analysis_id ) Index ( analysis_id ) analysis_idanalysis_id bigint not null References analysis ( analysis_id ) collection_statusTable qiita.collection_status Primary Key ( collection_status_id ) collection_status_idcollection_status_id bigserial not null Referred by collection ( collection_status_id ) statusstatus varchar(1) not null collectionTable qiita.collection Tracks a group of analyses and important jobs for an overarching goal. Primary Key ( collection_id ) collection_idcollection_id bigserial not null Referred by collection_analysis ( collection_id ) Referred by collection_job ( collection_id ) Referred by collection_users ( collection_id ) Index ( email ) emailemail varchar not null References qiita_user ( email ) namename varchar(100) not null descriptiondescription varchar Index ( collection_status_id ) collection_status_idcollection_status_id bigint not null default 1 References collection_status ( collection_status_id ) collection_usersTable qiita.collection_users Allows sharing of a collection Primary Key ( collection_id, email ) Index ( collection_id ) collection_idcollection_id bigint not null References collection ( collection_id ) Primary Key ( collection_id, email ) Index ( email ) emailemail varchar not null References qiita_user ( email ) study_sample_columnsTable qiita.study_sample_columns Holds information on which metadata columns are available for the study sample template Primary Key ( study_id, column_name, column_type ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, column_name, column_type ) column_namecolumn_name varchar not null Primary Key ( study_id, column_name, column_type ) column_typecolumn_type varchar not null analysisTable qiita.analysis hHolds analysis information Primary Key ( analysis_id ) analysis_idanalysis_id bigserial not null Unique identifier for analysis Referred by analysis_chain ( parent_id -> analysis_id ) Referred by analysis_chain ( child_id -> analysis_id ) Referred by analysis_filepath ( analysis_id ) Referred by analysis_job ( analysis_id ) Referred by analysis_sample ( analysis_id ) Referred by analysis_users ( analysis_id ) Referred by analysis_workflow ( analysis_id ) Referred by collection_analysis ( analysis_id ) Index ( email ) emailemail varchar not null Email for user who owns the analysis References qiita_user ( email ) namename varchar not null Name of the analysis descriptiondescription varchar not null Index ( analysis_status_id ) analysis_status_idanalysis_status_id bigint not null References analysis_status ( analysis_status_id ) pmidpmid varchar PMID of paper from the analysis timestamptimestamp timestamptz default current_timestamp dfltdflt bool not null default false study_experimental_factorTable qiita.study_experimental_factor EFO ontological link of experimental factors to studies Primary Key ( study_id, efo_id ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, efo_id ) efo_idefo_id bigint not null study_pmidTable qiita.study_pmid Links a study to all PMIDs for papers created from study Primary Key ( study_id, pmid ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) Primary Key ( study_id, pmid ) pmidpmid varchar not null studyTable qiita.study Primary Key ( study_id ) study_idstudy_id bigserial not null Unique name for study Referred by investigation_study ( study_id ) Referred by study_sample ( study_id ) Referred by sample_template_filepath ( study_id ) Referred by study_environmental_package ( study_id ) Referred by study_experimental_factor ( study_id ) Referred by study_pmid ( study_id ) Referred by study_preprocessed_data ( study_id ) Referred by study_processed_data ( study_id ) Referred by study_raw_data ( study_id ) Referred by study_sample_columns ( study_id ) Referred by study_users ( study_id ) Index ( email ) emailemail varchar not null Email of study owner References qiita_user ( email ) Index ( emp_person_id ) emp_person_idemp_person_id bigint References study_person ( emp_person_id -> study_person_id ) first_contactfirst_contact timestamp not null default current_timestamp fundingfunding varchar Index ( timeseries_type_id ) timeseries_type_idtimeseries_type_id bigint not null What type of timeseries this study is (or is not) Controlled Vocabulary References timeseries_type ( timeseries_type_id ) Index ( lab_person_id ) lab_person_idlab_person_id bigint References study_person ( lab_person_id -> study_person_id ) metadata_completemetadata_complete bool not null mixs_compliantmixs_compliant bool not null most_recent_contactmost_recent_contact timestamp number_samples_collectednumber_samples_collected integer number_samples_promisednumber_samples_promised integer Index ( portal_type_id ) portal_type_idportal_type_id bigint not null References portal_type ( portal_type_id ) Index ( principal_investigator_id ) principal_investigator_idprincipal_investigator_id bigint not null References study_person ( principal_investigator_id -> study_person_id ) reprocessreprocess bool not null spatial_seriesspatial_series bool Unique Index ( study_title ) study_titlestudy_title varchar not null study_aliasstudy_alias varchar not null study_descriptionstudy_description text not null study_abstractstudy_abstract text not null vamps_idvamps_id varchar processed_dataTable qiita.processed_data Primary Key ( processed_data_id ) processed_data_idprocessed_data_id bigserial not null Referred by analysis_sample ( processed_data_id ) Referred by preprocessed_processed_data ( processed_data_id ) Referred by processed_filepath ( processed_data_id ) Referred by study_processed_data ( processed_data_id ) processed_params_tableprocessed_params_table varchar not null Name of table holding processing params processed_params_idprocessed_params_id bigint not null Link to a table with the parameters used to generate processed data processed_dateprocessed_date timestamp not null Index ( data_type_id ) data_type_iddata_type_id bigint not null References data_type ( data_type_id ) link_filepaths_statuslink_filepaths_status varchar not null default 'idle' Index ( processed_data_status_id ) processed_data_status_idprocessed_data_status_id bigint not null default 4 References processed_data_status ( processed_data_status_id ) investigationTable qiita.investigation Overarching investigation information.An investigation comprises one or more individual studies. Primary Key ( investigation_id ) investigation_idinvestigation_id bigserial not null Referred by investigation_study ( investigation_id ) investigation_nameinvestigation_name varchar not null investigation_descriptioninvestigation_description varchar not null Describes the overarching goal of the investigation Index ( contact_person_id ) contact_person_idcontact_person_id bigint References study_person ( contact_person_id -> study_person_id ) processed_data_statusTable qiita.processed_data_status Primary Key ( processed_data_status_id ) processed_data_status_idprocessed_data_status_id bigserial not null Referred by processed_data ( processed_data_status_id ) Unique Index ( processed_data_status ) processed_data_statusprocessed_data_status varchar not null processed_data_status_descriptionprocessed_data_status_description varchar not null portal_typeTable qiita.portal_type What portals are available to show a study in Primary Key ( portal_type_id ) portal_type_idportal_type_id bigserial not null Referred by study ( portal_type_id ) portalportal varchar not null portal_descriptionportal_description varchar not null analysis_sampleTable qiita.analysis_sample Index ( analysis_id ) Primary Key ( analysis_id, processed_data_id, sample_id ) analysis_idanalysis_id bigint not null References analysis ( analysis_id ) Index ( processed_data_id ) Primary Key ( analysis_id, processed_data_id, sample_id ) processed_data_idprocessed_data_id bigint not null References processed_data ( processed_data_id ) Index ( sample_id ) Primary Key ( analysis_id, processed_data_id, sample_id ) sample_idsample_id varchar not null References study_sample ( sample_id ) study_sampleTable qiita.study_sample Required info for each sample. One row is one sample. Primary Key ( sample_id ) sample_idsample_id varchar not null Referred by analysis_sample ( sample_id ) Referred by prep_template_sample ( sample_id ) Index ( study_id ) study_idstudy_id bigint not null References study ( study_id ) prep_template_sampleTable qiita.prep_template_sample Primary Key ( prep_template_id, sample_id ) Index ( prep_template_id ) prep_template_idprep_template_id bigint not null The prep template identifier References prep_template ( prep_template_id ) Index ( sample_id ) Index ( sample_id ) Primary Key ( prep_template_id, sample_id ) sample_idsample_id varchar not null References study_sample ( sample_id )

Table controlled_vocab_values
vocab_value_id bigserial NOT NULL
controlled_vocab_id bigint NOT NULL
term varchar NOT NULL
order_by varchar NOT NULL
default_item varchar
Indexes
pk_controlled_vocab_values primary key ON vocab_value_id
idx_controlled_vocab_values ON controlled_vocab_id
Foreign Keys
fk_controlled_vocab_values ( controlled_vocab_id ) ref controlled_vocab (controlled_vocab_id)


Table investigation_study
investigation_id bigint NOT NULL
study_id bigint NOT NULL
Indexes
idx_investigation_study primary key ON investigation_id, study_id
idx_investigation_study_investigation ON investigation_id
idx_investigation_study_study ON study_id
Foreign Keys
fk_investigation_study ( investigation_id ) ref investigation (investigation_id)
fk_investigation_study_study ( study_id ) ref study (study_id)


Table job_results_filepath
Holds connection between jobs and the result filepaths
job_id bigint NOT NULL
filepath_id bigint NOT NULL
Indexes
idx_job_results_filepath primary key ON job_id, filepath_id
idx_job_results_filepath_0 ON job_id
idx_job_results_filepath_1 ON filepath_id
Foreign Keys
fk_job_results_filepath ( job_id ) ref job (job_id)
fk_job_results_filepath_0 ( filepath_id ) ref filepath (filepath_id)


Table analysis_job
Holds information for a one-to-many relation of analysis to the jobs in it
analysis_id bigint NOT NULL Id of the analysis
job_id bigint NOT NULL Id for a job that is part of the analysis
Indexes
idx_analysis_jobs primary key ON analysis_id, job_id
idx_analysis_job ON analysis_id
idx_analysis_job_0 ON job_id
Foreign Keys
fk_analysis_job_analysis ( analysis_id ) ref analysis (analysis_id)
fk_analysis_job_job ( job_id ) ref job (job_id)


Table analysis_chain
Keeps track of the chain of analysis edits. Tracks what previous analysis a given analysis came from.If a given analysis is not in child_id, it is the root of the chain.
parent_id bigint NOT NULL
child_id bigint NOT NULL
Indexes
idx_analysis_chain ON parent_id
idx_analysis_chain_0 ON child_id
idx_analysis_chain_1 primary key ON parent_id, child_id
Foreign Keys
fk_analysis_chain ( parent_id ) ref analysis (analysis_id)
fk_analysis_chain_0 ( child_id ) ref analysis (analysis_id)


Table column_controlled_vocabularies
Table relates a column with a controlled vocabulary.
controlled_vocab_id bigserial NOT NULL
column_name varchar NOT NULL
Indexes
idx_column_controlled_vocabularies primary key ON controlled_vocab_id, column_name
idx_column_controlled_vocabularies_0 ON column_name
idx_column_controlled_vocabularies_1 ON controlled_vocab_id
Foreign Keys
fk_column_controlled_vocabularies ( column_name ) ref mixs_field_description (column_name)
fk_column_controlled_vocab2 ( controlled_vocab_id ) ref controlled_vocab (controlled_vocab_id)


Table mixs_field_description
column_name varchar NOT NULL
data_type varchar NOT NULL
desc_or_value varchar NOT NULL
definition varchar NOT NULL
min_length integer
active integer NOT NULL
Indexes
pk_mixs_field_description primary key ON column_name


Table analysis_users
Links analyses to the users they are shared with
analysis_id bigint NOT NULL
email varchar NOT NULL
Indexes
idx_analysis_users primary key ON analysis_id, email
idx_analysis_users_analysis ON analysis_id
idx_analysis_users_email ON email
Foreign Keys
fk_analysis_users_analysis ( analysis_id ) ref analysis (analysis_id)
fk_analysis_users_user ( email ) ref qiita_user (email)


Table study_preprocessed_data
study_id bigint NOT NULL
preprocessed_data_id bigint NOT NULL
Indexes
idx_study_preprocessed_data primary key ON study_id, preprocessed_data_id
idx_study_preprocessed_data_0 ON study_id
idx_study_preprocessed_data_1 ON preprocessed_data_id
Foreign Keys
fk_study_preprocessed_data ( study_id ) ref study (study_id)
fk_study_preprocessed_data_0 ( preprocessed_data_id ) ref preprocessed_data (preprocessed_data_id)


Table study_users
Links shared studies to users they are shared with
study_id bigint NOT NULL
email varchar NOT NULL
Indexes
idx_study_users primary key ON study_id, email
idx_study_users_0 ON study_id
idx_study_users_1 ON email
Foreign Keys
fk_study_users_study ( study_id ) ref study (study_id)
fk_study_users_user ( email ) ref qiita_user (email)


Table sample_x
data for samples in study x (sample template)x is the study_id from study tableMAKE SURE sample_id IS FK TO sample_id IN required_sample_info TABLE
sample_id varchar NOT NULL
description varchar NOT NULL
other_mapping_columns varchar Represents whatever other columns go with this study
Indexes
pk_study_x_y primary key ON sample_id


Table study_raw_data
links study to its raw data
study_id bigint NOT NULL
raw_data_id bigint NOT NULL
Indexes
idx_study_raw_data ON study_id
idx_study_raw_data_0 primary key ON study_id, raw_data_id
Foreign Keys
fk_study_raw_data_study ( study_id ) ref study (study_id)
fk_study_raw_data_raw_data ( raw_data_id ) ref raw_data (raw_data_id)


Table processed_filepath
processed_data_id bigint NOT NULL
filepath_id bigint NOT NULL
Indexes
idx_processed_filepath primary key ON processed_data_id, filepath_id
Foreign Keys
fk_processed_data_filepath ( processed_data_id ) ref processed_data (processed_data_id)
fk_processed_data_filepath_0 ( filepath_id ) ref filepath (filepath_id)


Table command
Available commands for jobs
command_id bigserial NOT NULL Unique identifier for function
name varchar NOT NULL
command varchar NOT NULL What command to call to run this function
input varchar NOT NULL JSON of input options for the command
required varchar NOT NULL JSON of required options for the command
optional varchar NOT NULL JSON of optional options for command
output varchar NOT NULL JSON of output options for the command
Indexes
pk_command primary key ON command_id


Table logging
logging_id bigserial NOT NULL
time timestamp NOT NULL Time the error was thrown
severity_id integer NOT NULL
msg varchar NOT NULL Error message thrown
information varchar Other applicable information (depending on error)
Indexes
idx_logging_0 ON severity_id
pk_logging primary key ON logging_id
Foreign Keys
fk_logging_severity ( severity_id ) ref severity (severity_id)


Table study_processed_data
study_id bigint NOT NULL
processed_data_id bigint NOT NULL
Indexes
idx_study_processed_data primary key ON study_id, processed_data_id
idx_study_processed_data_0 ON study_id
pk_study_processed_data unique ON processed_data_id
Foreign Keys
fk_study_processed_data ( study_id ) ref study (study_id)
fk_study_processed_data_0 ( processed_data_id ) ref processed_data (processed_data_id)


Table command_data_type
command_id bigint NOT NULL
data_type_id bigint NOT NULL
Indexes
idx_command_data_type primary key ON command_id, data_type_id
idx_command_data_type_0 ON command_id
idx_command_data_type_1 ON data_type_id
Foreign Keys
fk_command_data_type ( command_id ) ref command (command_id)
fk_command_data_type_0 ( data_type_id ) ref data_type (data_type_id)


Table preprocessed_filepath
preprocessed_data_id bigint NOT NULL
filepath_id bigint NOT NULL
Indexes
idx_preprocessed_filepath primary key ON preprocessed_data_id, filepath_id
idx_preprocessed_filepath_0 ON preprocessed_data_id
idx_preprocessed_filepath_1 ON filepath_id
Foreign Keys
fk_preprocessed_filepath ( preprocessed_data_id ) ref preprocessed_data (preprocessed_data_id)
fk_preprocessed_filepath_0 ( filepath_id ) ref filepath (filepath_id)


Table analysis_filepath
Stores link between analysis and the data file used for the analysis.
analysis_id bigint NOT NULL
filepath_id bigint NOT NULL
data_type_id bigint
Indexes
idx_analysis_filepath ON analysis_id
idx_analysis_filepath_0 ON filepath_id
idx_analysis_filepath_1 primary key ON analysis_id, filepath_id
idx_analysis_filepath_2 ON data_type_id
Foreign Keys
fk_analysis_filepath ( analysis_id ) ref analysis (analysis_id)
fk_analysis_filepath_0 ( filepath_id ) ref filepath (filepath_id)
fk_analysis_filepath_1 ( data_type_id ) ref data_type (data_type_id)


Table analysis_workflow
Stores what step in_production analyses are on.
analysis_id bigint NOT NULL
step integer NOT NULL
Indexes
pk_analysis_workflow primary key ON analysis_id
Foreign Keys
fk_analysis_workflow ( analysis_id ) ref analysis (analysis_id)


Table column_ontology
This table relates a column with an ontology.
column_name varchar NOT NULL
ontology_short_name varchar NOT NULL
bioportal_id integer NOT NULL
ontology_branch_id varchar
Indexes
idx_column_ontology primary key ON column_name, ontology_short_name
idx_column_ontology_0 ON column_name
Foreign Keys
fk_column_ontology ( column_name ) ref mixs_field_description (column_name)


Table study_person
Contact information for the various people involved in a study
study_person_id bigserial NOT NULL
name varchar NOT NULL
email varchar NOT NULL
affiliation varchar NOT NULL The institution with which this person is affiliated
address varchar( 100 )
phone varchar
Indexes
pk_study_person primary key ON study_person_id
idx_study_person unique ON name, affiliation


Table controlled_vocab
controlled_vocab_id bigserial NOT NULL
controlled_vocab varchar NOT NULL
Indexes
pk_controlled_vocabularies primary key ON controlled_vocab_id


Table ontology
ontology_id bigint NOT NULL
ontology varchar NOT NULL
fully_loaded bool NOT NULL
fullname varchar
query_url varchar
source_url varchar
definition text
load_date date NOT NULL
Indexes
pk_ontology primary key ON ontology_id
idx_ontology unique ON ontology


Table preprocessed_spectra_params
Parameters used for processing spectra data.
preprocessed_params_id bigserial NOT NULL
col varchar
Indexes
pk_preprocessed_spectra_params primary key ON preprocessed_params_id


Table processed_params_uclust
Parameters used for processing data using method uclust
processed_params_id bigserial NOT NULL
reference_id bigint NOT NULL What version of reference or type of reference used
similarity float8 NOT NULL DEFO 0.97
enable_rev_strand_match bool NOT NULL DEFO TRUE
suppress_new_clusters bool NOT NULL DEFO TRUE
Indexes
pk_processed_params_uclust primary key ON processed_params_id
idx_processed_params_uclust ON reference_id
Foreign Keys
fk_processed_params_uclust ( reference_id ) ref reference (reference_id)


Table preprocessed_processed_data
preprocessed_data_id bigint NOT NULL
processed_data_id bigint NOT NULL
Indexes
idx_preprocessed_processed_data primary key ON preprocessed_data_id, processed_data_id
idx_preprocessed_processed_data_0 ON preprocessed_data_id
idx_preprocessed_processed_data_1 ON processed_data_id
Foreign Keys
fk_preprocessed_processed_data ( preprocessed_data_id ) ref preprocessed_data (preprocessed_data_id)
fk_preprocessed_processed_data_0 ( processed_data_id ) ref processed_data (processed_data_id)


Table qiita_user
Holds all user information
email varchar NOT NULL
user_level_id integer NOT NULL DEFO 5 user level
password varchar NOT NULL
name varchar
affiliation varchar
address varchar
phone varchar
user_verify_code varchar Code for initial user email verification
pass_reset_code varchar Randomly generated code for password reset
pass_reset_timestamp timestamp Time the reset code was generated
Indexes
pk_user primary key ON email
idx_user ON user_level_id
Foreign Keys
fk_user_user_level ( user_level_id ) ref user_level (user_level_id)


Table prep_y
Information on how raw data y was prepared (prep template)Linked by y being raw_data_id from raw data table.
sample_id varchar NOT NULL
data bigint STUFFFFF
Indexes
pk_prep_y primary key ON sample_id


Table prep_columns
prep_template_id bigint NOT NULL
column_name varchar NOT NULL
column_type varchar NOT NULL
Indexes
idx_prep_columns_0 primary key ON prep_template_id, column_name, column_type
idx_prep_columns_1 ON prep_template_id
Foreign Keys
fk_prep_columns_prep_template ( prep_template_id ) ref prep_template (prep_template_id)


Table raw_filepath
raw_data_id bigint NOT NULL
filepath_id bigint NOT NULL
Indexes
idx_raw_filepath primary key ON raw_data_id, filepath_id
idx_raw_filepath_0 ON filepath_id
idx_raw_filepath_1 ON raw_data_id
Foreign Keys
fk_raw_filepath ( filepath_id ) ref filepath (filepath_id)
fk_raw_filepath_0 ( raw_data_id ) ref raw_data (raw_data_id)


Table filetype
Type of file (FASTA, FASTQ, SPECTRA, etc)
filetype_id bigserial NOT NULL
type varchar NOT NULL
Indexes
pk_filetype primary key ON filetype_id
idx_filetype unique ON type


Table filepath_type
filepath_type_id bigserial NOT NULL
filepath_type varchar
Indexes
pk_filepath_type primary key ON filepath_type_id
idx_filepath_type unique ON filepath_type


Table checksum_algorithm
checksum_algorithm_id bigserial NOT NULL
name varchar NOT NULL
Indexes
pk_checksum_algorithm primary key ON checksum_algorithm_id
idx_checksum_algorithm unique ON name


Table data_type
data_type_id bigserial NOT NULL
data_type varchar NOT NULL Data type (16S, metabolome, etc) the job will use
Indexes
pk_data_type primary key ON data_type_id
idx_data_type unique ON data_type


Table user_level
Holds available user levels
user_level_id serial NOT NULL
name varchar NOT NULL One of the user levels (admin, user, guest, etc)
description text NOT NULL
Indexes
pk_user_level primary key ON user_level_id
idx_user_level unique ON name


Table job_status
job_status_id bigserial NOT NULL
status varchar NOT NULL
Indexes
pk_job_status primary key ON job_status_id
idx_job_status_0 unique ON status


Table severity
severity_id serial NOT NULL
severity varchar NOT NULL
Indexes
pk_severity primary key ON severity_id
idx_severity unique ON severity


Table prep_template
prep_template_id bigserial NOT NULL
data_type_id bigint NOT NULL
raw_data_id bigint NOT NULL
preprocessing_status varchar NOT NULL DEFO 'not_preprocessed'
investigation_type varchar The investigation type (e.g., one of the values from EBI's set of known types)
Indexes
pk_prep_template primary key ON prep_template_id
idx_prep_template ON data_type_id
idx_prep_template_0 ON raw_data_id
Foreign Keys
fk_prep_template_data_type ( data_type_id ) ref data_type (data_type_id)
fk_prep_template_raw_data ( raw_data_id ) ref raw_data (raw_data_id)


Table raw_data
raw_data_id bigserial NOT NULL
filetype_id bigint NOT NULL
link_filepaths_status varchar NOT NULL DEFO 'idle'
Indexes
pk_raw_data unique ON raw_data_id
idx_raw_data ON filetype_id
pk_raw_data_0 primary key ON raw_data_id
Foreign Keys
fk_raw_data_filetype ( filetype_id ) ref filetype (filetype_id)


Table job
job_id bigserial NOT NULL Unique identifier for job
data_type_id bigint NOT NULL What datatype (16s, metabolome, etc) job is run on.
job_status_id bigint NOT NULL
command_id bigint NOT NULL The Qiime or other function being run (alpha diversity, etc)
options varchar Holds all options set for the job as a json string
log_id bigint Reference to error if status is error
Indexes
pk_job primary key ON job_id
idx_job_command ON command_id
idx_job_status ON job_status_id
idx_job_type ON data_type_id
idx_job ON log_id
Foreign Keys
fk_job_function ( command_id ) ref command (command_id)
fk_job_job_status_id ( job_status_id ) ref job_status (job_status_id)
fk_job_data_type ( data_type_id ) ref data_type (data_type_id)
fk_job ( log_id ) ref logging (logging_id)


Table filepath
filepath_id bigserial NOT NULL
filepath varchar NOT NULL
filepath_type_id bigint NOT NULL
checksum varchar NOT NULL
checksum_algorithm_id bigint NOT NULL
data_directory_id bigserial
Indexes
pk_filepath primary key ON filepath_id
idx_filepath ON filepath_type_id
idx_filepath_0 ON data_directory_id
Foreign Keys
fk_filepath ( filepath_type_id ) ref filepath_type (filepath_type_id)
fk_filepath_0 ( checksum_algorithm_id ) ref checksum_algorithm (checksum_algorithm_id)
fk_filepath_data_directory ( data_directory_id ) ref data_directory (data_directory_id)


Table data_directory
data_directory_id bigserial NOT NULL
data_type varchar NOT NULL
mountpoint varchar NOT NULL
subdirectory varchar NOT NULL
active bool NOT NULL
Indexes
pk_data_directory primary key ON data_directory_id


Table term
term_id bigserial NOT NULL
ontology_id bigint NOT NULL
old_term_id bigint DEFO NULL Identifier used in the old system, we are keeping this for consistency
term varchar NOT NULL
identifier varchar
definition varchar
namespace varchar
is_obsolete bool DEFO 'false'
is_root_term bool
is_leaf bool
user_defined bool NOT NULL DEFO False Whether or not this term was defined by a user
Indexes
pk_term primary key ON term_id
idx_term ON ontology_id
Foreign Keys
fk_term_ontology ( ontology_id ) ref ontology (ontology_id)


Table environmental_package
environmental_package_name varchar NOT NULL The name of the environmental package
metadata_table varchar NOT NULL Contains the name of the table that contains the pre-defined metadata columns for the environmental package
Indexes
pk_environmental_package primary key ON environmental_package_name


Table study_environmental_package
Holds the 1 to many relationship between the study and the environmental_package
study_id bigint NOT NULL
environmental_package_name varchar NOT NULL
Indexes
pk_study_environmental_package primary key ON study_id, environmental_package_name
idx_study_environmental_package ON study_id
idx_study_environmental_package_0 ON environmental_package_name
Foreign Keys
fk_study_environmental_package ( study_id ) ref study (study_id)
fk_study_environmental_package_0 ( environmental_package_name ) ref environmental_package (environmental_package_name)


Table timeseries_type
timeseries_type_id bigserial NOT NULL
timeseries_type varchar NOT NULL
intervention_type varchar NOT NULL DEFO 'None'
Indexes
pk_timeseries_type primary key ON timeseries_type_id
idx_timeseries_type unique ON timeseries_type, intervention_type


Table prep_template_filepath
prep_template_id bigint NOT NULL
filepath_id bigint NOT NULL
Indexes
idx_prep_template_filepath primary key ON prep_template_id, filepath_id
idx_prep_template_filepath ON filepath_id
idx_prep_template_filepath ON prep_template_id
Foreign Keys
fk_filepath_id ( filepath_id ) ref filepath (filepath_id)
fk_prep_template_id ( prep_template_id ) ref prep_template (prep_template_id)


Table sample_template_filepath
study_id bigint NOT NULL
filepath_id bigint NOT NULL
Indexes
idx_sample_template_filepath primary key ON study_id, filepath_id
idx_sample_template_filepath_0 ON study_id
idx_sample_template_filepath_1 ON filepath_id
Foreign Keys
fk_study_id ( study_id ) ref study (study_id)
fk_filepath_id ( filepath_id ) ref filepath (filepath_id)


Table prep_template_preprocessed_data
prep_template_id bigint NOT NULL
preprocessed_data_id bigint NOT NULL
Indexes
idx_prep_template_preprocessed_data primary key ON prep_template_id, preprocessed_data_id
idx_prep_template_preprocessed_data_0 ON prep_template_id
idx_prep_template_preprocessed_data_1 ON preprocessed_data_id
Foreign Keys
fk_prep_template_id ( prep_template_id ) ref prep_template (prep_template_id)
fk_prep_template_preprocessed_data ( preprocessed_data_id ) ref preprocessed_data (preprocessed_data_id)


Table preprocessed_data
preprocessed_data_id bigserial NOT NULL
preprocessed_params_table varchar NOT NULL Name of table holding the params
preprocessed_params_id bigint NOT NULL
submitted_to_insdc_status varchar NOT NULL DEFO 'not submitted'
ebi_submission_accession varchar
ebi_study_accession varchar
data_type_id bigint NOT NULL
link_filepaths_status varchar NOT NULL DEFO 'idle'
submitted_to_vamps_status varchar DEFO 'not submitted'
processing_status varchar NOT NULL DEFO 'not_processed'
Indexes
pk_preprocessed_data primary key ON preprocessed_data_id
idx_preprocessed_data ON data_type_id
Foreign Keys
fk_preprocessed_data ( data_type_id ) ref data_type (data_type_id)


Table reference
reference_id bigserial NOT NULL
reference_name varchar NOT NULL
reference_version varchar
sequence_filepath bigint NOT NULL
taxonomy_filepath bigint
tree_filepath bigint
Indexes
pk_reference primary key ON reference_id
idx_reference ON sequence_filepath
idx_reference_0 ON taxonomy_filepath
idx_reference_1 ON tree_filepath
Foreign Keys
fk_reference_sequence_filepath ( sequence_filepath ) ref filepath (filepath_id)
fk_reference_taxonomy_filepath ( taxonomy_filepath ) ref filepath (filepath_id)
fk_reference_tree_filepath ( tree_filepath ) ref filepath (filepath_id)


Table preprocessed_sequence_454_params
Parameters used for processing sequence data.
preprocessed_params_id bigserial NOT NULL
param_set_name varchar( 100 ) NOT NULL The name of the parameter set
min_seq_len integer NOT NULL DEFO 200 The minimum sequence length
max_seq_len integer NOT NULL DEFO 1000 The maximum sequence length
trim_seq_length bool NOT NULL DEFO f Whether to trim the sequence length or not
min_qual_score integer NOT NULL DEFO 25 The minimum phred quality score
max_ambig integer NOT NULL DEFO 6 The maximum number of ambiguous characters
max_homopolymer integer NOT NULL DEFO 6 The maximum homopolymer run
max_primer_mismatch integer NOT NULL DEFO 0 Maximum number of mismatches to the primer allowed
barcode_type varchar NOT NULL DEFO 'golay_12' The barcode type used
max_barcode_errors real NOT NULL DEFO 1.5 The maximum number of allowed barcode errors
disable_bc_correction bool NOT NULL DEFO f Disable barcode correction
qual_score_window integer NOT NULL DEFO 0 Enable a sliding window quality score threshold, this is the size of the window
disable_primers bool NOT NULL DEFO f Disable primer checking
reverse_primers varchar NOT NULL DEFO 'disable' Check for reverse primers
reverse_primer_mismatches integer NOT NULL DEFO 0 The number of allowed mismatches in the reverse primer
truncate_ambig_bases_bool bool NOT NULL DEFO f Truncate at the first ambiguous base
Indexes
pk_preprocessed_sequence_454_params primary key ON preprocessed_params_id


Table preprocessed_sequence_illumina_params
Parameters used for processing illumina sequence data.
preprocessed_params_id bigserial NOT NULL
max_bad_run_length integer NOT NULL DEFO 3
min_per_read_length_fraction real NOT NULL DEFO 0.75
sequence_max_n integer NOT NULL DEFO 0
rev_comp_barcode bool NOT NULL DEFO FALSE
rev_comp_mapping_barcodes bool NOT NULL DEFO FALSE
rev_comp bool NOT NULL DEFO FALSE
phred_quality_threshold integer NOT NULL DEFO 3
barcode_type varchar NOT NULL DEFO 'golay_12'
max_barcode_errors real NOT NULL DEFO 1.5
param_set_name varchar( 100 ) NOT NULL The name of the parameter set
Indexes
pk_preprocessed_sequence_illumina_params primary key ON preprocessed_params_id


Table processed_params_sortmerna
Parameters used for processing data using method sortmerna
processed_params_id bigserial NOT NULL
reference_id bigint NOT NULL What version of reference or type of reference used
sortmerna_e_value float8 NOT NULL
sortmerna_max_pos integer NOT NULL
similarity float8 NOT NULL
sortmerna_coverage float8 NOT NULL
threads integer NOT NULL
param_set_name varchar( 100 ) NOT NULL DEFO 'Default' The name of the parameter set
Indexes
pk_processed_params_sortmerna primary key ON processed_params_id
idx_processed_params_sortmerna ON reference_id
Foreign Keys
fk_processed_params_sortmerna ( reference_id ) ref reference (reference_id)


Table analysis_status
analysis_status_id bigserial NOT NULL
status varchar NOT NULL
Indexes
pk_analysis_status primary key ON analysis_status_id
idx_analysis_status unique ON status


Table collection_job
Matches collection important jobs as one to many.
collection_id bigint NOT NULL
job_id bigint NOT NULL
Indexes
idx_collection_job ON collection_id
idx_collection_job_0 ON job_id
idx_collection_job_1 primary key ON collection_id, job_id
Foreign Keys
fk_collection_job ( collection_id ) ref collection (collection_id)
fk_collection_job_0 ( job_id ) ref job (job_id)


Table collection_analysis
Matches collection to analyses as one to many.
collection_id bigint NOT NULL
analysis_id bigint NOT NULL
Indexes
idx_collection_analysis primary key ON collection_id, analysis_id
idx_collection_analysis_0 ON collection_id
idx_collection_analysis_1 ON analysis_id
Foreign Keys
fk_collection_analysis ( collection_id ) ref collection (collection_id)
fk_collection_analysis_0 ( analysis_id ) ref analysis (analysis_id)


Table collection_status
collection_status_id bigserial NOT NULL
status varchar( 1 ) NOT NULL
Indexes
pk_collection_status primary key ON collection_status_id


Table collection
Tracks a group of analyses and important jobs for an overarching goal.
collection_id bigserial NOT NULL
email varchar NOT NULL
name varchar( 100 ) NOT NULL
description varchar
collection_status_id bigint NOT NULL DEFO 1
Indexes
pk_collection primary key ON collection_id
idx_collection ON email
idx_collection_0 ON collection_status_id
Foreign Keys
fk_collection ( email ) ref qiita_user (email)
fk_collection_0 ( collection_status_id ) ref collection_status (collection_status_id)


Table collection_users
Allows sharing of a collection
collection_id bigint NOT NULL
email varchar NOT NULL
Indexes
idx_collection_user primary key ON collection_id, email
idx_collection_user_0 ON collection_id
idx_collection_user_1 ON email
Foreign Keys
fk_collection_user ( collection_id ) ref collection (collection_id)
fk_collection_user_email ( email ) ref qiita_user (email)


Table study_sample_columns
Holds information on which metadata columns are available for the study sample template
study_id bigint NOT NULL
column_name varchar NOT NULL
column_type varchar NOT NULL
Indexes
idx_study_mapping_columns primary key ON study_id, column_name, column_type
idx_study_mapping_columns_study_id ON study_id
Foreign Keys
fk_study_mapping_columns_study ( study_id ) ref study (study_id)


Table analysis
hHolds analysis information
analysis_id bigserial NOT NULL Unique identifier for analysis
email varchar NOT NULL Email for user who owns the analysis
name varchar NOT NULL Name of the analysis
description varchar NOT NULL
analysis_status_id bigint NOT NULL
pmid varchar PMID of paper from the analysis
timestamp timestamptz DEFO current_timestamp
dflt bool NOT NULL DEFO false
Indexes
pk_analysis primary key ON analysis_id
idx_analysis_email ON email
idx_analysis_status_id ON analysis_status_id
Foreign Keys
fk_analysis_user ( email ) ref qiita_user (email)
fk_analysis_analysis_status ( analysis_status_id ) ref analysis_status (analysis_status_id)


Table study_experimental_factor
EFO ontological link of experimental factors to studies
study_id bigint NOT NULL
efo_id bigint NOT NULL
Indexes
idx_study_experimental_factor primary key ON study_id, efo_id
idx_study_experimental_factor_0 ON study_id
Foreign Keys
fk_study_experimental_factor ( study_id ) ref study (study_id)


Table study_pmid
Links a study to all PMIDs for papers created from study
study_id bigint NOT NULL
pmid varchar NOT NULL
Indexes
idx_study_pmid primary key ON study_id, pmid
idx_study_pmid_0 ON study_id
Foreign Keys
fk_study_pmid_study ( study_id ) ref study (study_id)


Table study
study_id bigserial NOT NULL Unique name for study
email varchar NOT NULL Email of study owner
emp_person_id bigint
first_contact timestamp NOT NULL DEFO current_timestamp
funding varchar
timeseries_type_id bigint NOT NULL What type of timeseries this study is (or is not) Controlled Vocabulary
lab_person_id bigint
metadata_complete bool NOT NULL
mixs_compliant bool NOT NULL
most_recent_contact timestamp
number_samples_collected integer
number_samples_promised integer
portal_type_id bigint NOT NULL
principal_investigator_id bigint NOT NULL
reprocess bool NOT NULL
spatial_series bool
study_title varchar NOT NULL
study_alias varchar NOT NULL
study_description text NOT NULL
study_abstract text NOT NULL
vamps_id varchar
Indexes
pk_study primary key ON study_id
idx_study ON email
idx_study_1 ON emp_person_id
idx_study_2 ON lab_person_id
idx_study_3 ON principal_investigator_id
idx_study_4 ON timeseries_type_id
idx_study_5 ON portal_type_id
unique_study_title unique ON study_title
Foreign Keys
fk_study_user ( email ) ref qiita_user (email)
fk_study_study_emp_person ( emp_person_id ) ref study_person (study_person_id)
fk_study_study_lab_person ( lab_person_id ) ref study_person (study_person_id)
fk_study_study_pi_person ( principal_investigator_id ) ref study_person (study_person_id)
fk_study_timeseries_type ( timeseries_type_id ) ref timeseries_type (timeseries_type_id)
fk_study ( portal_type_id ) ref portal_type (portal_type_id)


Table processed_data
processed_data_id bigserial NOT NULL
processed_params_table varchar NOT NULL Name of table holding processing params
processed_params_id bigint NOT NULL Link to a table with the parameters used to generate processed data
processed_date timestamp NOT NULL
data_type_id bigint NOT NULL
link_filepaths_status varchar NOT NULL DEFO 'idle'
processed_data_status_id bigint NOT NULL DEFO 4
Indexes
pk_processed_data primary key ON processed_data_id
idx_processed_data ON data_type_id
idx_processed_data_0 ON processed_data_status_id
Foreign Keys
fk_processed_data ( data_type_id ) ref data_type (data_type_id)
fk_processed_data_status ( processed_data_status_id ) ref processed_data_status (processed_data_status_id)


Table investigation
Overarching investigation information.An investigation comprises one or more individual studies.
investigation_id bigserial NOT NULL
investigation_name varchar NOT NULL
investigation_description varchar NOT NULL Describes the overarching goal of the investigation
contact_person_id bigint
Indexes
pk_investigation primary key ON investigation_id
idx_investigation ON contact_person_id
Foreign Keys
fk_investigation_study_person ( contact_person_id ) ref study_person (study_person_id)


Table processed_data_status
processed_data_status_id bigserial NOT NULL
processed_data_status varchar NOT NULL
processed_data_status_description varchar NOT NULL
Indexes
pk_study_status primary key ON processed_data_status_id
idx_study_status unique ON processed_data_status


Table portal_type
What portals are available to show a study in
portal_type_id bigserial NOT NULL
portal varchar NOT NULL
portal_description varchar NOT NULL
Indexes
pk_portal_type primary key ON portal_type_id


Table analysis_sample
analysis_id bigint NOT NULL
processed_data_id bigint NOT NULL
sample_id varchar NOT NULL
Indexes
idx_analysis_sample ON analysis_id
idx_analysis_sample_0 ON processed_data_id
idx_analysis_sample_1 ON sample_id
pk_analysis_sample primary key ON analysis_id, processed_data_id, sample_id
Foreign Keys
fk_analysis_sample_analysis ( analysis_id ) ref analysis (analysis_id)
fk_analysis_processed_data ( processed_data_id ) ref processed_data (processed_data_id)
fk_analysis_sample ( sample_id ) ref study_sample (sample_id)


Table study_sample
Required info for each sample. One row is one sample.
sample_id varchar NOT NULL
study_id bigint NOT NULL
Indexes
idx_required_sample_info ON study_id
idx_required_sample_info_1 primary key ON sample_id
Foreign Keys
fk_required_sample_info_study ( study_id ) ref study (study_id)


Table prep_template_sample
prep_template_id bigint NOT NULL The prep template identifier
sample_id varchar NOT NULL
Indexes
idx_required_prep_info_2 ON sample_id
idx_common_prep_info_0 ON sample_id
idx_common_prep_info primary key ON prep_template_id, sample_id
idx_common_prep_info_1 ON prep_template_id
Foreign Keys
fk_common_prep_info ( sample_id ) ref study_sample (sample_id)
fk_prep_template ( prep_template_id ) ref prep_template (prep_template_id)