ENTRY


 table REF_ENTITY_TYPE
 table REF_STRUCT_CONN_TYPE
 table REF_STRUCT_SOLN_TYPE
 table REF_STRUCT_METHOD
 table REF_POLY_TOP
 table REF_SEQUENCE
 table REF_EXP_PROC_METH
 table REF_SOFTWARE

 table DEPOSITION
 table DEP_HETGROUP
 table DEP_ENTITY
 table DEP_ENTITY_NAME
 table DEP_ENTITY_CMPNT
 table AUTO_ENTITY_POLY_LIST
 table DEP_ENTITY_INST_CMPNT
 table DEP_ENTITY_INST
 table DEP_ENTITY_LINK
 table DEP_HETGROUP
 table DEP_ASSEMBLY
 table DEP_ASSEMBLY_MODEL
 table DEP_GEN_ASSEMBLY
 table DEP_ASSEM_BURIED
 table DEP_MODEL
 table DEP_BIOL_STRUCTURE
 table DEP_BIOL_CHAIN
 table DEP_CONNECTION
 table DEP_SEQ_REF
 table DEP_SEQ_MATCH
 table DEP_SEQ_ADV
 table DEP_RESIDUE_MOD
 table DEP_DATABASE_ID

create table REF_ENTITY_TYPE ( RET_ID number(10,0) not null, NAME varchar2(20) not null, DETAILS varchar2(80) not null ) ;

create table REF_STRUCT_CONN_TYPE ( RSCT_ID number(10,0) not null, CONN_ID varchar2(255) not null, REFERENCE varchar2(700) null, CRITERIA varchar2(700) null, NAME varchar2(700) null ) ;

create table REF_STRUCT_SOLN_TYPE ( DETAILS varchar2(700) not null, SOLUTION_ID varchar2(255) not null, RSST_ID number(10,0) not null ) ;

create table REF_STRUCT_METHOD ( METHOD varchar2(700) not null, RSM1_ID number(10,0) not null, DETAILS varchar2(700) null ) ;

create table REF_POLY_TOP ( NAME varchar2(255) not null, RPT1_ID number(10,0) not null, DETAILS varchar2(255) null ) ;

create table REF_SEQUENCE ( RSL_RSL_ID number(10,0) not null, SEQ_SERIAL number(38) not null, RS1_ID number(10,0) not null, SCC_SCC_ID number(10,0) not null, RS1_RS1_ID number(10,0) null ) ;

create table REF_EXP_PROC_METH ( REPM_ID number(10,0) not null, EXP_PROCESS_NAME varchar2(80) not null, DETAILS varchar2(2000) null, SOFTWARE_NAME varchar2(80) null ) ;

create table REF_SOFTWARE ( SOFTWARE_ID number(38) not null, NAME varchar2(80) not null, RS_ID number(10,0) not null, VERSION varchar2(80) not null, CLASSIFICATION varchar2(80) not null, RC1_RC1_ID number(10,0) null, CONTACT_AUTHOR varchar2(80) null, CONTACT_AUTHOR_EMAIL varchar2(80) null, DESCRIPTION varchar2(255) null ) ;

create table DEPOSITION ( DEP_ID number(10,0) not null, RCN_RCN_ID number(10,0) not null, RPS_RPS_ID number(10,0) not null, NUM_XTALS number(38) default 0 not null, CREATION_DATE date not null, TITLE varchar2(2000) not null, LAST_UPDATE date not null, PDB_EXP_TYPE varchar2(255) null, HTTP_REFERER varchar2(20) null, DATE_ALL_ARRIVED_DATE date null, RELEASE_DATE date null, HOLD_DATE date null, HARVEST_PROJECT_NAME varchar2(80) null, DEP_PASSWORD varchar2(20) null, HTTP_USER_AGENT varchar2(20) null, ACCESSION_CODE varchar2(8) null, VIRUS_FLAG char(1) null, IMMUNE_RELATED char(1) null, DETAILS_NDB varchar2(2000) null, MODEL_DETAILS varchar2(240) null, RET1_RET1_ID number(10,0) null, RSF_RSF_ID number(10,0) null, RHC1_RHC1_ID number(10,0) null, RHC_RHC_ID number(10,0) null, RHC1_RHC1_ID_CP55 number(10,0) null, RHC1_RHC1_ID_CP54 number(10,0) null, RHC_RHC_ID_CP58 number(10,0) null, RHC_RHC_ID_CP57 number(10,0) null ) ;

create table DEP_ENTITY ( DE_ID number(10,0) not null, DEP_DEP_ID number(10,0) not null, ID varchar2(255) not null, NAME varchar2(255) not null, DE_TYPE varchar2(10) not null, HETERO_FLAG char(1) default 'N' not null, SYNTHETIC char(1) default 'N' not null, DETAILS varchar2(2000) null, SYSTEM varchar2(255) null, SYSTEMATIC_NAME varchar2(80) null, COMMON_NAME varchar2(80) null, FORMULA_WGHT number(8,0) null, ENGINEERED varchar2(255) null, MUTANT_FLAG varchar2(255) null, FRAGMENT_FLAG varchar2(255) null, MUTATION_STRING varchar2(40) null, MASTER_ID varchar2(255) null, SCC_SCC_ID number(10,0) null, RNS_RNS_ID number(10,0) null, RET_RET_ID number(10,0) null, RES1_RES1_ID number(10,0) null, RSL_RSL_ID number(10,0) null, RES_RES_ID number(10,0) null, PREV_ID number(10,0) null, NEXT_ID number(10,0) null, PARENT_ENTITY_ID number(10,0) null, ) ;

create table DEP_ENTITY_NAME ( DE_DE_ID number(10,0) not null, NAME varchar2(255) not null, DEN_TYPE varchar2(255) not null, DEN_ID number(10,0) not null ) ;

create table DEP_ENTITY_CMPNT ( DEC2_ID number(10,0) not null, DEC2_TYPE varchar2(10) not null, HETERO char(1) default 'N' not null, SERIAL number(38) null, DLC_SERIAL number(38) null, DEP_MOL_COMP_ID number(10,0) null, DEP_MOL_ENTITY_ID number(10,0) null, REF_MOL_COMP_ID number(10,0) null, DEP_POLY_COMP_ID number(10,0) null, DEP_POLY_ENTITY_ID number(10,0) null, REF_POLY_COMP_ID number(10,0) null ) ;

create table AUTO_ENTITY_POLY_LIST ( DE_DE_ID number(10,0) not null, NUM_RNA number(38) not null, NUM_DNA number(38) not null, NUM_LPEPT number(38) not null, NUM_MONO number(38) not null, AEPL_ID number(10,0) not null, RPT_RPT_ID number(10,0) not null, NSTD_CHIRALITY varchar2(1) not null, NSTD_LINKAGE varchar2(1) not null, NSTD_MONO varchar2(1) not null ) ;

create table DEP_ENTITY_INST_CMPNT ( DEIC_ID number(10,0) not null, DEIC_TYPE varchar2(10) not null, PDB_SEQ number(38) null, PDB_ID varchar2(3) null, AUTH_ID varchar2(8) null, AUTH_SEQ varchar2(8) null, AUTH_INSERT_CODE varchar2(1) null, PDB_INSERT_CODE varchar2(1) null, DEP_BOUND_MOL_ID number(10,0) null, DEP_LINKED_CMPNT_ID number(10,0) null, DEP_CHAIN_ID number(10,0) null, D_POLY_ENTITY_SEQ_ID number(10,0) null, SERIAL number(38) null, DEP_WATER_GROUP_ID number(10,0) null, RS1_RS1_ID number(10,0) null ) ;

create table DEP_ENTITY_INST ( DEP_DEP_ID number(10,0) not null, ID varchar2(8) not null, DEI_ID number(10,0) not null, DEI_TYPE varchar2(10) not null, CROT11 float(27) default 1.0 not null, CROT12 float(27) default 0.0 not null, CROT13 float(27) default 0.0 not null, CROT21 float(27) default 0.0 not null, CROT22 float(27) default 1.0 not null, CROT23 float(27) default 0.0 not null, CROT31 float(27) default 0.0 not null, CROT32 float(27) default 0.0 not null, CROT33 float(27) default 1.0 not null, CTRANS1 float(27) default 0.0 not null, CTRANS2 float(27) default 0.0 not null, CTRANS3 float(27) default 0.0 not null, DBS1_DBS1_ID number(10,0) null, MASTER_ID varchar2(8) null, PDB_ID varchar2(1) null, AUTH_ID varchar2(8) null, DETAILS varchar2(2000) null, NDB_ORDER varchar2(240) null, TITLE varchar2(255) null, DEP_WATER_ID number(10,0) null, DEP_MOL_ENTITY_ID number(10,0) null, DEIC_DEIC_ID number(10,0) null, DEI_DEI_ID number(10,0) null, ) ;

create table DEP_ENTITY_LINK ( RCL_RCL_ID number(10,0) not null, DEL_ID number(10,0) not null, DEI_DEI_ID number(10,0) not null, DEI_DEI_ID_CP655 number(10,0) not null, SEQ_1 number(38) not null, SEQ_2 number(38) not null, DETAILS varchar2(500) null ) ;

create table DEP_HETGROUP ( DEP_DEP_ID number(10,0) null SCC_SCC_ID number(10,0) not null, DH1_ID number(10,0) not null, SERIAL number(38) not null, ACCESSION_CODE varchar2(8) not null, COORD_RELEASE_DATE date not null, ) ;

create table DEP_ASSEMBLY ( DEP_DEP_ID number(10,0) not null, DA_ID number(10,0) not null, DA_TYPE varchar2(50) not null, SERIAL number(38) not null, STATUS varchar2(10) not null, CLASS varchar2(2) not null, COPY_SERIAL number(38) default 0 not null, N_RES_BURIED number(38) null, N_SB number(38) null, TOT_ASA number(12,6) null, D_ASA number(12,6) null, D_SE number(12,6) null, TOT_SE number(12,6) null, RAMA number(4,2) null, MORRIS_G number null, N_HETATM number(38) null, RMS number(8) null, B_MAIN number null, B_SIDE number null, N_RESID number(38) null, N_SS number(38) null, N_CHAINS number(38) null, DA_FORM varchar2(50) null, DA_GROUP varchar2(2) null, SCORE number(38) null, TITLE varchar2(255) null ) ;

create table DEP_ASSEMBLY_MODEL ( DA_DA_ID number(10,0) not null, DM2_DM2_ID number(10,0) not null, DAM_ID number(10,0) not null, N_H_BONDS number(38) null, N_SALTBRIDGE number(38) null, N_BURIED number(38) null, PERCENT_ASA number null, DELTA_ASA number null, TOTAL_ASA number null, DELTA__E_SOLV number null, TOTAL_E_SOLV number null, RAMA number null ) ;

create table DEP_GEN_ASSEMBLY ( DA_DA_ID number(10,0) not null, DGA1_ID number(10,0) not null, DGA1_TYPE varchar2(10) not null, RSE_RSE_ID number(10,0) not null, CROT11 float(27) not null, CROT12 float(27) not null, CROT13 float(27) not null, CROT21 float(27) not null, CROT22 float(27) not null, CROT23 float(27) not null, CROT31 float(27) not null, CROT32 float(27) not null, CROT33 float(27) not null, CTRANS1 float(27) not null, CTRANS2 float(27) not null, CTRANS3 float(27) not null, TRANS_A number(1,0) default 0 not null, TRANS_B number(1,0) default 0 not null, TRANS_C number(1,0) default 0 not null, DGAB_ASA number null, DGAB_SOLE number null, ASA number null, SOLE number null, NUM_RESID number(38) null, SYMM_ASYM_ID varchar2(8) null, DEP_WATER_MOL_ID number(10,0) null, DEP_CHAIN_ID number(10,0) null, DEP_BOUND_MOL_ID number(10,0) null, DETAILS varchar2(2000) null ) ;

create table DEP_ASSEM_BURIED ( DAB_ID number(10,0) not null, DGA1_DGA1_ID number(10,0) not null, REL_BIO number(8,0) not null, BUR_SERIAL number(38) not null, CHAIN varchar2(8) not null, RES varchar2(8) not null, REL_ISO number(8,0) not null, SEQ number(38) not null ) ;

create table DEP_MODEL ( DEP_DEP_ID number(10,0) not null, DM2_ID number(10,0) not null, MODEL_SERIAL number(38) default 0 not null ) ;

create table DEP_BIOL_STRUCTURE ( DEP_DEP_ID number(10,0) not null, DBS1_ID number(10,0) not null, DETAILS varchar2(240) null, KEYWORD varchar2(700) null, NAME varchar2(255) null ) ;

create table DEP_BIOL_CHAIN ( DBC_ID number(10,0) not null, DBS1_DBS1_ID number(10,0) not null, ID_CIF varchar2(240) null, ID_PDB_NEW varchar2(240) null, DEI_DEI_ID number(10,0) null, RSE_RSE_ID number(10,0) null ) ;

create table DEP_CONNECTION ( DEP_DEP_ID number(10,0) not null, DC1_ID number(10,0) not null, RSCT_RSCT_ID number(10,0) not null, ATOM_ID_1 number(10,0) not null, ATOM_ID_2 number(10,0) not null, SYMM_EQUIV_1 number(10,0) not null, SYMM_EQUIV_2 number(10,0) not null, TRANS_A_1 number(1,0) default 0 not null, TRANS_A_2 number(1,0) default 0 not null, TRANS_B_1 number(1,0) default 0 not null, TRANS_B_2 number(1,0) default 0 not null, TRANS_C_1 number(1,0) default 0 not null, TRANS_C_2 number(1,0) default 0 not null, XYZ_ALT_ID_1 number(10,0) null, XYZ_ALT_ID_2 number(10,0) null, CONNECTION_ROLE_ID_1 number(10,0) null, CONNECTION_ROLE_ID_2 number(10,0) null, ID varchar2(255) null, DETAILS varchar2(255) null ) ;

create table DEP_SEQ_REF ( DSR_ID number(10,0) not null, DB_AC_CODE varchar2(80) not null, RS1_RS1_ID number(10,0) not null, RSD_RSD_ID number(10,0) not null, SEQ_ALIGN varchar2(1) not null, SEQ_DIF varchar2(1) not null, DETAILS varchar2(240) null ) ;

create table DEP_SEQ_MATCH ( RS1_RS1_ID number(10,0) not null, RS1_RS1_ID_CP619 number(10,0) not null, DSM_ID number(10,0) not null, DSR_DSR_ID number(10,0) not null, DB_ALIGN_BEG number(38) not null, DB_ALIGN_END number(38) not null, DB_ALIGN_DETAILS varchar2(240) null, PDB_INS_BEG varchar2(255) null, PDB_INS_END varchar2(255) null ) ;

create table DEP_SEQ_ADV ( DSA1_ID number(10,0) not null, CHEM_COMP_ID varchar2(8) not null, DB_CHEM_COMP_ID varchar2(8) not null, DSM_DSM_ID number(10,0) not null, RS1_RS1_ID number(10,0) not null, DETAILS varchar2(80) null ) ;

create table DEP_RESIDUE_MOD ( DRM_ID number(10,0) not null, RCM_RCM_ID number(10,0) not null, SCC_SCC_ID number(10,0) not null, RS1_RS1_ID number(10,0) not null, SCC_SCC_ID_CP721 number(10,0) null ) ;

create table DEP_DATABASE_ID ( DB_CODE varchar2(80) not null, RDI_RDI_ID number(10,0) not null, DEP_DEP_ID number(10,0) not null, DDI1_ID number(10,0) not null ) ;


alter table REF_ENTITY_TYPE add (constraint RET_PK primary key (RET_ID) ) ; alter table REF_ENTITY_TYPE add ( constraint RET_RET1_UK unique (NAME) ) ; alter table REF_STRUCT_CONN_TYPE add (constraint RSCT_PK primary key (RSCT_ID) ) ; alter table REF_STRUCT_CONN_TYPE add ( constraint RSCT_RSCT1_UK unique (CONN_ID) ) ; alter table REF_STRUCT_SOLN_TYPE add (constraint RSST_PK primary key (RSST_ID)) alter table REF_STRUCT_SOLN_TYPE add ( constraint RSST_RSST1_UK unique (SOLUTION_ID)) alter table REF_STRUCT_METHOD add (constraint RSM1_PK primary key (RSM1_ID)) alter table REF_POLY_TOP add (constraint RPT1_PK primary key (RPT1_ID)) alter table REF_POLY_TOP add ( constraint RPT1_RPT11_UK unique (NAME)) alter table REF_SEQUENCE add (constraint RS1_PK primary key (RS1_ID)) alter table REF_EXP_PROC_METH add (constraint REPM_PK primary key (REPM_ID)) alter table REF_EXP_PROC_METH add ( constraint REPM_REPM1_UK unique (EXP_PROCESS_NAME)) alter table REF_SOFTWARE add constraint RS_RC1_FK foreign key (RC1_RC1_ID) references REF_CITATIONS (RC1_ID) on delete cascade alter table REF_CONNECT_MOD_TYPE add ( constraint RCMT1_RCMT11_UK unique (MOD_TYPE) ) ; alter table REF_CONNECTION_ROLE add ( constraint RCR_RCR1_UK unique (ROLE_ID) ) ; alter table REF_POLYMER_TYPE add ( constraint RPT_RPT1_UK unique (POLYMER_SUBTYPE, CODE) ) ; alter table REF_SEQ_DB add (constraint RSD_PK primary key (RSD_ID) ) ; alter table DEPOSITION add (constraint DEP_PK primary key (DEP_ID ) ) ; alter table DEPOSITION add (constraint AVCON_1611784_VIRUS_000 check (VIRUS_FLAG IN ('Y', 'N'))) add (constraint AVCON_1611784_IMMUN_000 check (IMMUNE_RELATED IN ('Y', 'N') ) ) ; alter table DEPOSITION add constraint DEP_RHC1_CP54_FK foreign key (RHC1_RHC1_ID_CP54) references REF_HEADER_CLASS (RHC1_ID) on delete cascade add constraint DEP_RET1_FK foreign key (RET1_RET1_ID) references REF_EXP_TYPE (RET1_ID) on delete cascade add constraint DEP_RSF_FK foreign key (RSF_RSF_ID) references REF_SPECIAL_FEATURE (RSF_ID) on delete cascade add constraint DEP_RCN_FK foreign key (RCN_RCN_ID) references REF_CONTACT_NAME (RCN_ID) on delete cascade add constraint DEP_RHC_CP58_FK foreign key (RHC_RHC_ID_CP58) references REF_HEADER_CATEGORY (RHC_ID) on delete cascade add constraint DEP_RHC_CP57_FK foreign key (RHC_RHC_ID_CP57) references REF_HEADER_CATEGORY (RHC_ID) on delete cascade add constraint DEP_RHC1_FK foreign key (RHC1_RHC1_ID) references REF_HEADER_CLASS (RHC1_ID) on delete cascade add constraint DEP_RPS_FK foreign key (RPS_RPS_ID) references REF_PROCESSING_STATUS (RPS_ID) on delete cascade add constraint DEP_RHC_FK foreign key (RHC_RHC_ID) references REF_HEADER_CATEGORY (RHC_ID) on delete cascade add constraint DEP_RHC1_CP55_FK foreign key (RHC1_RHC1_ID_CP55) references REF_HEADER_CLASS (RHC1_ID) on delete cascade alter table DEP_MODEL add (constraint DM2_PK primary key (DM2_ID) ) ; alter table DEP_MODEL add ( constraint DM2_DM21_UK unique (MODEL_SERIAL, DEP_DEP_ID ) ) ; alter table DEP_MODEL add constraint DM2_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_ENTITY add (constraint DE_PK primary key (DE_ID) ) ; alter table DEP_ENTITY add ( constraint DE_DE1_UK unique (DEP_DEP_ID ,ID) ) ; alter table DEP_ENTITY add (constraint AVCON_1611703_HETER_000 check (HETERO_FLAG IN ('Y', 'N'))) add (constraint AVCON_1611703_SYNTH_000 check (SYNTHETIC IN ('Y', 'N'))) add (constraint AVCON_1611703_DE_TY_000 check (DE_TYPE IN ('DME1', 'DW', 'DPE') ) ) ; alter table DEP_ENTITY add constraint DE_SCC_FK foreign key (SCC_SCC_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DE_RNS_FK foreign key (RNS_RNS_ID) references REF_NATURAL_SOURCE (RNS_ID) on delete cascade add constraint DE_DE_FOLLOWS_FK foreign key (NEXT_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DE_RET_FK foreign key (RET_RET_ID) references REF_ENTITY_TYPE (RET_ID) on delete cascade add constraint DE_RES1_FK foreign key (RES1_RES1_ID) references REF_ENTITY_SRC (RES1_ID) on delete cascade add constraint DE_RSL_FK foreign key (RSL_RSL_ID) references REF_SEQUENCE_LIST (RSL_ID) on delete cascade add constraint DE_DE_IS_CHILD_OF_FK foreign key (PARENT_ENTITY_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DE_RES_FK foreign key (RES_RES_ID) references REF_EXPRESSION_SYSTEM (RES_ID) on delete cascade add constraint DE_DE_FK foreign key (PREV_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DE_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_ENTITY_CMPNT add (constraint DEC2_PK primary key (DEC2_ID)) alter table DEP_ENTITY_CMPNT add (constraint AVCON_1611704_HETER_000 check (HETERO IN ('Y', 'N'))) add (constraint AVCON_1611704_DEC2__000 check (DEC2_TYPE IN ('DLC', 'DPES') ) ) ; alter table DEP_ENTITY_CMPNT add ( constraint DEC2_DLC1_UK unique (DEP_MOL_ENTITY_ID, DLC_SERIAL, DEP_MOL_COMP_ID, REF_MOL_COMP_ID) ) add ( constraint DEC2_DPES1_UK unique (DEP_POLY_ENTITY_ID, SERIAL, REF_POLY_COMP_ID, DEP_POLY_COMP_ID) ) ; alter table DEP_ENTITY_CMPNT add constraint DEC2_DE_IS_A_COMPONENT_OF_FK foreign key (DEP_MOL_ENTITY_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DEC2_SCC_IS_DEFINED_BY_FK_1 foreign key (REF_MOL_COMP_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DEC2_DE_FK foreign key (DEP_POLY_ENTITY_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DEC2_SCC_FK foreign key (REF_POLY_COMP_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DEC2_SCC_IS_DEFINED_BY_FK_2 foreign key (DEP_MOL_COMP_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DEC2_SCC_IS_DEFINED_BY_FK foreign key (DEP_POLY_COMP_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade alter table DEP_ENTITY_INST add (constraint DEI_PK primary key (DEI_ID) ) ; alter table DEP_ENTITY_INST add ( constraint DEI_DEI1_UK unique (ID, DEP_DEP_ID ) ) ; alter table DEP_ENTITY_INST add (constraint AVCON_1611705_DEI_T_000 check (DEI_TYPE IN ('DWG', 'DBM', 'DC') ) ) ; alter table DEP_ENTITY_INST add constraint DEI_DE_FK foreign key (DEP_WATER_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DEI_DE_IS_DESCRIBED_BY_FK foreign key (DEP_MOL_ENTITY_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DEI_DEIC_FK foreign key (DEIC_DEIC_ID) references DEP_ENTITY_INST_CMPNT (DEIC_ID) on delete cascade add constraint DEI_DBS1_FK foreign key (DBS1_DBS1_ID) references DEP_BIOL_STRUCTURE (DBS1_ID) on delete cascade add constraint DEI_DA_FK foreign key (DA_DA_ID) references DEP_ASSEMBLY (DA_ID) on delete cascade add constraint DEI_DE_IS_DESCRIBED_BY_FK_1 foreign key (DEP_POLY_ENTITY_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint DEI_REN_FK foreign key (REN_REN_ID) references REF_EC_NUMBER (REN_ID) on delete cascade add constraint DEI_DEI_PRECEDES_FK foreign key (PREV_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEI_DEI_FOLLOWS_FK foreign key (NEXT_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEI_DEI_FK foreign key (DEI_DEI_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEI_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_ENTITY_INST_CMPNT add (constraint AVCON_1611707_DEIC__000 check (DEIC_TYPE IN ('DMC1', 'DWM', 'DR1') ) ) ; alter table DEP_ENTITY_INST_CMPNT add (constraint DEIC_PK primary key (DEIC_ID) ) ; alter table DEP_ENTITY_INST_CMPNT add ( constraint DEIC_DMC11_UK unique (DEP_BOUND_MOL_ID, DEP_LINKED_CMPNT_ID) ) add ( constraint DEIC_DR11_UK unique (DEP_CHAIN_ID, D_POLY_ENTITY_SEQ_ID) ) add ( constraint DEIC_DWM1_UK unique (DEP_WATER_GROUP_ID, SERIAL) ) ; alter table DEP_ENTITY_INST_CMPNT add constraint DEIC_DEI_FK foreign key (DEP_WATER_GROUP_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEIC_DEI_COMPOSES_FK foreign key (DEP_BOUND_MOL_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEIC_DEC2_FK foreign key (DEP_LINKED_CMPNT_ID) references DEP_ENTITY_CMPNT (DEC2_ID) on delete cascade add constraint DEIC_DEI_COMPOSES_FK_1 foreign key (DEP_CHAIN_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEIC_RS1_FK foreign key (RS1_RS1_ID) references REF_SEQUENCE (RS1_ID) on delete cascade add constraint DEIC_DEC2_IS_DESCRIBED_BY_FK foreign key (D_POLY_ENTITY_SEQ_ID) references DEP_ENTITY_CMPNT (DEC2_ID) on delete cascade alter table DEP_ENTITY_NAME add (constraint DEN_PK primary key (DEN_ID) ) ; alter table DEP_ENTITY_NAME add ( constraint DEN_DEN1_UK unique (DEN_TYPE, NAME, DE_DE_ID) ) ; alter table DEP_ENTITY_NAME add (constraint AVCON_1608294_DEN_T_000 check (DEN_TYPE IN ('COM', 'SYS') ) ) ; alter table DEP_ENTITY_NAME add constraint DEN_DE_FK foreign key (DE_DE_ID) references DEP_ENTITY (DE_ID) on delete cascade alter table DEP_ENTITY_LINK add (constraint DEL_PK primary key (DEL_ID) ) ; alter table DEP_ENTITY_LINK add ( constraint DEL_DEL1_UK unique (RCL_RCL_ID) ) ; alter table DEP_ENTITY_LINK add constraint DEL_DEI_FK foreign key (DEI_DEI_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DEL_RCL_FK foreign key (RCL_RCL_ID) references REF_CHEM_LINK (RCL_ID) on delete cascade add constraint DEL_DEI_CP655_FK foreign key (DEI_DEI_ID_CP655) references DEP_ENTITY_INST (DEI_ID) on delete cascade alter table DEP_BIOL_STRUCTURE add (constraint DBS1_PK primary key (DBS1_ID) ) ; alter table DEP_BIOL_STRUCTURE add ( constraint DBS1_DBS11_UK unique (NAME, DEP_DEP_ID ) ) ; alter table DEP_BIOL_CHAIN add constraint DBC_DBS1_FK foreign key (DBS1_DBS1_ID) references DEP_BIOL_STRUCTURE (DBS1_ID) on delete cascade add constraint DBC_DEI_FK foreign key (DEI_DEI_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DBC_RSE_FK foreign key (RSE_RSE_ID) references REF_SYMM_EQUIV (RSE_ID) on delete cascade alter table DEP_BIOL_STRUCTURE add constraint DBS1_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_BIOL_CHAIN add (constraint DBC_PK primary key (DBC_ID) ) ; alter table DEP_BIOL_CHAIN add ( constraint DBC_DBC1_UK unique (DBS1_DBS1_ID, DEI_DEI_ID) ) ; alter table DEP_RESIDUE_MOD add (constraint DRM_PK primary key (DRM_ID) ) ; alter table DEP_RESIDUE_MOD add constraint DRM_RCM_FK foreign key (RCM_RCM_ID) references REF_CHEM_MOD (RCM_ID) on delete cascade add constraint DRM_SCC_FK foreign key (SCC_SCC_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DRM_SCC_CP721_FK foreign key (SCC_SCC_ID_CP721) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DRM_RS1_FK foreign key (RS1_RS1_ID) references REF_SEQUENCE (RS1_ID) on delete cascade alter table DEP_SEQ_REF add (constraint DSR_PK primary key (DSR_ID) ) ; alter table DEP_SEQ_REF add ( constraint DSR_DSR1_UK unique (RS1_RS1_ID, RSD_RSD_ID, DB_AC_CODE, SEQ_ALIGN) ) ; alter table DEP_SEQ_REF add constraint DSR_RS1_FK foreign key (RS1_RS1_ID) references REF_SEQUENCE (RS1_ID) on delete cascade add constraint DSR_RSD_FK foreign key (RSD_RSD_ID) references REF_SEQ_DB (RSD_ID) on delete cascade alter table DEP_SEQ_ADV add (constraint DSA1_PK primary key (DSA1_ID) ) ; alter table DEP_SEQ_ADV add ( constraint DSA1_DSA11_UK unique (DSM_DSM_ID) ) ; alter table DEP_SEQ_ADV add constraint DSA1_RS1_FK foreign key (RS1_RS1_ID) references REF_SEQUENCE (RS1_ID) on delete cascade add constraint DSA1_DSM_FK foreign key (DSM_DSM_ID) references DEP_SEQ_MATCH (DSM_ID) on delete cascade alter table DEP_SEQ_MATCH add (constraint DSM_PK primary key (DSM_ID) ) ; alter table DEP_SEQ_MATCH add ( constraint DSM_DSM1_UK unique (DB_ALIGN_END, DB_ALIGN_BEG, RS1_RS1_ID, RS1_RS1_ID_CP619) ) ; alter table DEP_SEQ_MATCH add constraint DSM_RS1_CP619_FK foreign key (RS1_RS1_ID_CP619) references REF_SEQUENCE (RS1_ID) on delete cascade add constraint DSM_DSR_FK foreign key (DSR_DSR_ID) references DEP_SEQ_REF (DSR_ID) on delete cascade add constraint DSM_RS1_FK foreign key (RS1_RS1_ID) references REF_SEQUENCE (RS1_ID) on delete cascade alter table DEP_ASSEMBLY add (constraint DA_PK primary key (DA_ID) ) ; alter table DEP_ASSEMBLY add ( constraint DA_DA1_UK unique (SERIAL, DEP_DEP_ID ) ) ; alter table DEP_ASSEMBLY add constraint DA_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_ASSEMBLY_ANNOT add (constraint DAA_PK primary key (DAA_ID) ) ; alter table DEP_ASSEMBLY_ANNOT add ( constraint DAA_DAA1_UK unique (DEP_DEP_ID ) ) ; alter table DEP_ASSEMBLY_ANNOT add constraint DAA_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_GEN_ASSEMBLY add (constraint DGA1_PK primary key (DGA1_ID) ) ; alter table DEP_GEN_ASSEMBLY add constraint DGA1_RSE_FK foreign key (RSE_RSE_ID) references REF_SYMM_EQUIV (RSE_ID) on delete cascade add constraint DGA1_DEIC_FK foreign key (DEP_WATER_MOL_ID) references DEP_ENTITY_INST_CMPNT (DEIC_ID) on delete cascade add constraint DGA1_DEI_APPLIED_TO_FK foreign key (DEP_BOUND_MOL_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DGA1_DEI_FK foreign key (DEP_CHAIN_ID) references DEP_ENTITY_INST (DEI_ID) on delete cascade add constraint DGA1_DA_FK foreign key (DA_DA_ID) references DEP_ASSEMBLY (DA_ID) on delete cascade alter table DEP_GEN_ASSEMBLY add (constraint AVCON_1611966_TRANS_000 check (TRANS_A BETWEEN -5 AND 4)) add (constraint AVCON_1611966_TRANS_001 check (TRANS_B BETWEEN -5 AND 4)) add (constraint AVCON_1611966_TRANS_002 check (TRANS_C BETWEEN -5 AND 4)) add (constraint AVCON_1611966_DGA1__000 check (DGA1_TYPE IN ('DGAC', 'DGAB', 'DGAW') ) ) ; alter table DEP_ASSEMBLY_MODEL add (constraint DAM_PK primary key (DAM_ID) ) ; alter table DEP_ASSEMBLY_MODEL add ( constraint DAM_DAM1_UK unique (DA_DA_ID, DM2_DM2_ID) ) ; alter table DEP_ASSEMBLY_MODEL add constraint DAM_DA_FK foreign key (DA_DA_ID) references DEP_ASSEMBLY (DA_ID) on delete cascade add constraint DAM_DM2_FK foreign key (DM2_DM2_ID) references DEP_MODEL (DM2_ID) on delete cascade alter table DEP_ASSEM_BURIED add (constraint DAB_PK primary key (DAB_ID) ) ; alter table DEP_ASSEM_BURIED add ( constraint DAB_DAB1_UK unique (DGA1_DGA1_ID, BUR_SERIAL) ) ; alter table DEP_ASSEM_BURIED add constraint DAB_DGA1_FK foreign key (DGA1_DGA1_ID) references DEP_GEN_ASSEMBLY (DGA1_ID) on delete cascade alter table DEP_CONNECTION add (constraint DC1_PK primary key (DC1_ID) ) ; alter table DEP_CONNECTION add ( constraint DC1_DC11_UK unique (DEP_DEP_ID , ID) ) ; add ( constraint DC1_DC12_UK unique (XYZ_ALT_ID_1, XYZ_ALT_ID_2, TRANS_A_1, TRANS_A_2, TRANS_B_1, TRANS_B_2, TRANS_C_1, TRANS_C_2, ATOM_ID_1, ATOM_ID_2, SYMM_EQUIV_1, SYMM_EQUIV_2) ) ; alter table DEP_CONNECTION add (constraint AVCON_1611774_TRANS_000 check (TRANS_A_1 BETWEEN -5 AND 4)) add (constraint AVCON_1611774_TRANS_001 check (TRANS_A_2 BETWEEN -5 AND 4)) add (constraint AVCON_1611774_TRANS_002 check (TRANS_B_1 BETWEEN -5 AND 4)) add (constraint AVCON_1611774_TRANS_003 check (TRANS_B_2 BETWEEN -5 AND 4)) add (constraint AVCON_1611774_TRANS_004 check (TRANS_C_1 BETWEEN -5 AND 4)) add (constraint AVCON_1611774_TRANS_005 check (TRANS_C_2 BETWEEN -5 AND 4) ) ; alter table DEP_CONNECTION add constraint DC1_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade add constraint DC1_RCR_FK foreign key (CONNECTION_ROLE_ID_2) references REF_CONNECTION_ROLE (RCR_ID) on delete cascade add constraint DC1_RCR_CP657_FK foreign key (CONNECTION_ROLE_ID_1) references REF_CONNECTION_ROLE (RCR_ID) on delete cascade add constraint DC1_RSCT_FK foreign key (RSCT_RSCT_ID) references REF_STRUCT_CONN_TYPE (RSCT_ID) on delete cascade add constraint DC1_RSE_FK foreign key (SYMM_EQUIV_1) references REF_SYMM_EQUIV (RSE_ID) on delete cascade add constraint DC1_RSE_TRANSFORMED_BY_FK foreign key (SYMM_EQUIV_2) references REF_SYMM_EQUIV (RSE_ID) on delete cascade add constraint DC1_DXA_FK foreign key (XYZ_ALT_ID_1) references DEP_XYZ_ALT (DXA_ID) on delete cascade add constraint DC1_DXA_ALT_CONF_2_FK foreign key (XYZ_ALT_ID_2) references DEP_XYZ_ALT (DXA_ID) on delete cascade add constraint DC1_DAS_FK foreign key (ATOM_ID_1) references DEP_ATOM_SITE (DAS_ID) on delete cascade add constraint DC1_DAS_CONNECTS_TO_FK foreign key (ATOM_ID_2) references DEP_ATOM_SITE (DAS_ID) on delete cascade alter table AUTO_ENTITY_POLY_LIST add (constraint AEPL_PK primary key (AEPL_ID) ) ; alter table AUTO_ENTITY_POLY_LIST add ( constraint AEPL_AEPL1_UK unique (DE_DE_ID) ) ; alter table AUTO_ENTITY_POLY_LIST add constraint AEPL_DE_FK foreign key (DE_DE_ID) references DEP_ENTITY (DE_ID) on delete cascade add constraint AEPL_RPT_FK foreign key (RPT_RPT_ID) references REF_POLYMER_TYPE (RPT_ID) on delete cascade alter table DEP_HET_FILES add constraint DHF_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_HETGROUP add (constraint DH1_PK primary key (DH1_ID)) alter table DEP_HETGROUP add ( constraint DH1_DH11_UK unique (SCC_SCC_ID, ACCESSION_CODE) ) add ( constraint DH1_DH12_UK unique (SCC_SCC_ID, SERIAL) ) ; alter table DEP_HETGROUP add constraint DH1_SCC_FK foreign key (SCC_SCC_ID) references SUP_CHEM_COMP (SCC_ID) on delete cascade add constraint DH1_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_DATABASE_ID add ( constraint DDI1_DDI11_UK unique (RDI_RDI_ID ,DEP_DEP_ID ,DB_CODE))