   PRIMARY KEY                 (INVESTIGATION_ID, ARRAY_ID)
 );
 
+CREATE TABLE INVESTIGATIONSOURCE
+(
+  INVESTIGATION_ID            BIGINT      NOT NULL,
+  SOURCE_ID                   BIGINT      NOT NULL,
+  PRIMARY KEY                 (INVESTIGATION_ID, SOURCE_ID)
+);
+
+CREATE TABLE INVESTIGATIONSAMPLE
+(
+  INVESTIGATION_ID            BIGINT      NOT NULL,
+  SAMPLE_ID                   BIGINT      NOT NULL,
+  PRIMARY KEY                 (INVESTIGATION_ID, SAMPLE_ID)
+);
+
 CREATE TABLE NORMALIZATIONTYPE
 (
   INVESTIGATION_ID            BIGINT      NOT NULL,


CREATE INDEX INVESTARRAY_ARRAY_IDX ON INVESTIGATIONARRAY(ARRAY_ID);

CREATE INDEX NORMTYPE_INVEST_IDX ON NORMALIZATIONTYPE(INVESTIGATION_ID);

CREATE INDEX NORMTYPE_TERM_IDX ON NORMALIZATIONTYPE(TERM_ID);

DROP TABLE IF EXISTS EXPERIMENT;
DROP TABLE IF EXISTS INVESTIGATIONARRAYDESIGN;
DROP TABLE IF EXISTS INVESTIGATIONARRAY;
DROP TABLE IF EXISTS INVESTIGATIONSOURCE;
DROP TABLE IF EXISTS INVESTIGATIONSAMPLE;
DROP TABLE IF EXISTS NORMALIZATIONTYPE;
DROP TABLE IF EXISTS REPLICATETYPE;
DROP TABLE IF EXISTS QUALITYCONTROLTYPE;
