CREATE CACHED TABLE affiliation (id int NOT NULL IDENTITY,organization_ref varchar(45) DEFAULT NULL,person_ref int DEFAULT NULL);

CREATE CACHED TABLE analysis_data (id int NOT NULL IDENTITY,dataCollection_ref int NOT NULL);


CREATE CACHED TABLE analysis_software (id int NOT NULL IDENTITY,reportedId varchar(100) DEFAULT NULL,version varchar(45) DEFAULT NULL,name varchar(100) DEFAULT NULL,asList_ref int DEFAULT NULL);



CREATE CACHED TABLE analysis_software_list (id int NOT NULL IDENTITY,mzid_ref int DEFAULT NULL);



CREATE CACHED TABLE audit_collection (id int NOT NULL IDENTITY,mzid_ref int DEFAULT NULL);



CREATE CACHED TABLE contact_role (id int NOT NULL IDENTITY,contact_ref varchar(45) DEFAULT NULL,provider_ref int DEFAULT NULL);


CREATE CACHED TABLE cv (id int NOT NULL IDENTITY,reportedId varchar(45) DEFAULT NULL,uri varchar(200) DEFAULT NULL,version varchar(20) DEFAULT NULL,fullName varchar(50) DEFAULT NULL,cvList_ref int NOT NULL);



CREATE CACHED TABLE cv_list (id int NOT NULL IDENTITY,mzid_ref int NOT NULL);



CREATE CACHED TABLE cv_param (id int NOT NULL IDENTITY,accession varchar(45) DEFAULT NULL,value varchar(500) DEFAULT NULL,name varchar(200) DEFAULT NULL,unitAccession varchar(45) DEFAULT NULL,unitName varchar(45) DEFAULT NULL,softwareName_ref int DEFAULT NULL,role_ref int DEFAULT NULL,person_ref int DEFAULT NULL,organisation_ref int DEFAULT NULL,modification_ref int DEFAULT NULL,spectrumIdentificationItem_ref int DEFAULT NULL, spectrumIdentificationResult_ref int DEFAULT NULL);



CREATE CACHED TABLE data_collection (id int NOT NULL IDENTITY,mzid_ref int NOT NULL);


CREATE CACHED TABLE db_sequence (id int NOT NULL IDENTITY,reportedId varchar(100) DEFAULT NULL,accession varchar(100) DEFAULT NULL,searchDatabase_ref varchar(45) DEFAULT NULL,sequenceCollection_ref int DEFAULT NULL);



CREATE CACHED TABLE modification (id int NOT NULL IDENTITY,monoisotopic_mass_delta double DEFAULT NULL,residues varchar(45) DEFAULT NULL,location int DEFAULT NULL,peptide_ref int DEFAULT NULL);



CREATE CACHED TABLE mzid (id int NOT NULL IDENTITY,reportedId varchar(45) DEFAULT NULL,name varchar(100) DEFAULT NULL,version varchar(45) DEFAULT NULL);



CREATE CACHED TABLE organisation (id int NOT NULL IDENTITY,reportedId varchar(45) DEFAULT NULL,name varchar(45) DEFAULT NULL,auditCollection_ref int DEFAULT NULL);



CREATE CACHED TABLE peptide (id int NOT NULL IDENTITY,reportedId varchar(500) DEFAULT NULL,sequenceCollection_ref int DEFAULT NULL);



CREATE CACHED TABLE peptide_evidence (id int NOT NULL IDENTITY,reportedId varchar(150) DEFAULT NULL,isDecoy boolean DEFAULT NULL,post char(1) DEFAULT NULL,pre char(1) DEFAULT NULL,end int DEFAULT NULL,start int DEFAULT NULL,peptide_ref varchar(500) DEFAULT NULL,dbSequence_ref varchar(150) DEFAULT NULL,sequenceCollection_ref int DEFAULT NULL);



CREATE CACHED TABLE peptide_evidence_ref (id int NOT NULL IDENTITY,peptideEvidence_ref varchar(200) NOT NULL,spectrumIdentificationItem_ref int NOT NULL);



CREATE CACHED TABLE peptide_sequence (id int NOT NULL IDENTITY,sequence varchar(210) DEFAULT NULL,peptide_ref int NOT NULL);



CREATE CACHED TABLE person (id int NOT NULL IDENTITY,reportedId varchar(45) DEFAULT NULL,firstName varchar(45) DEFAULT NULL,lastName varchar(45) DEFAULT NULL,auditCollection_ref int DEFAULT NULL);



CREATE CACHED TABLE provider (id int NOT NULL IDENTITY,reportedId varchar(45) DEFAULT NULL,mzid_ref int DEFAULT NULL);



CREATE CACHED TABLE role (id int NOT NULL IDENTITY,contactRole_ref int DEFAULT NULL);



CREATE CACHED TABLE sequence_collection (id int NOT NULL IDENTITY,mzid_ref int DEFAULT NULL);



CREATE CACHED TABLE software_name (id int NOT NULL IDENTITY,as_ref int DEFAULT NULL);



CREATE CACHED TABLE spectrum_identification_item (id int NOT NULL IDENTITY,reportedId varchar(50) NOT NULL,isPassThreshold boolean NOT NULL,rank int NOT NULL,peptide_ref varchar(400) NOT NULL,calculatedMassToCharge double NOT NULL,experimentalMassToCharge double NOT NULL,chargeState int NOT NULL,spectrumIdentificationResult_ref int NOT NULL);



CREATE CACHED TABLE spectrum_identification_list (id int NOT NULL IDENTITY,reportedId varchar(50) NOT NULL,analysisData_ref int NOT NULL);



CREATE CACHED TABLE spectrum_identification_result (id int NOT NULL IDENTITY,reportedId varchar(50) NOT NULL,spectrumID varchar(50) NOT NULL,spectraData_ref varchar(50) NOT NULL, retention_time double, spectrumIdentificationList_ref int NOT NULL);



CREATE CACHED TABLE user_param (id int NOT NULL IDENTITY,name varchar(45) DEFAULT NULL,value varchar(45) DEFAULT NULL,peptideEvidence_ref int DEFAULT NULL,spectrumIdentificationItem_ref int DEFAULT NULL);

