MIR


 REF_H_LS_TREATMENT    
 REF_PHASING_METHOD  
 DEP_HKLF_MIR_DER  
 DEP_MIR_SHELL    
 DEP_MIR_DER_SHELL 
 DEP_MIR_DER 
 DEP_MIR 
 DEP_DER_SITE 


create table REF_H_LS_TREATMENT ( HTREATMENT_NAME varchar2(700) not null, HTREATMENT_ID varchar2(255) not null, RHLT_ID number(10,0) not null ) ;

create table REF_PHASING_METHOD ( METHOD_ID varchar2(255) not null, RPM_ID number(10,0) not null, DETAILS varchar2(255) not null ) ;

create table DEP_HKLF_MIR_DER ( DHMD_ID number(10,0) not null, DMD_DMD_ID number(10,0) not null, H number(38) not null, K number(38) not null, L number(38) not null, HL_A_ISO number(8,0) null, HL_B_ISO number(8,0) null, HL_C_ISO number(8,0) null, HL_D_ISO number(8,0) null, PHASE_CALC number(8,0) null, F_CALC number(8,0) null, F_CALC_AU number(8,0) null, F_MEAS number(8,0) null, F_MEAS_AU number(8,0) null, F_MEAS_SIGMA number(8,0) null, F_MEAS_AU_SIGMA number(8,0) null ) ;

create table DEP_MIR_SHELL ( DM_DM_ID number(10,0) not null, DMS_ID number(10,0) not null, SHELL_SERIAL number(38) not null, FOM number(8,0) null, FOM_ACENTRIC number(8,0) null, FOM_CENTRIC number(8,0) null, MEAN_PHASE number(8,0) null, NUM_PHASED number(38) null, NUM_PHASED_ACEN number(38) null, NUM_PHASED_ANOM number(38) null, NUM_PHASED_CENT number(38) null, D_RES_LOW number(8,0) null, LOC number(8,0) null, POWER number(8,0) null, RCULLIS number(8,0) null, RKRAUT number(8,0) null, D_RES_HIGH number(8,0) null ) ;

create table DEP_MIR_DER_SHELL ( DMD_DMD_ID number(10,0) not null, DMDS_ID number(10,0) not null, SHELL_SERIAL number(38) not null, POWER number(8,0) null, RCULLIS number(8,0) null, RKRAUT number(8,0) null, NUM_PHASED number(38) null, PHASE number(8,0) null, D_RES_HIGH number(8,0) null, D_RES_LOW number(8,0) null, FOM number(8,0) null, HA_AMPL number(8,0) null, LOC number(8,0) null ) ;

create table DEP_MIR_DER ( DPL_DPL_ID number(10,0) not null, DMD_ID number(10,0) not null, DDS_DDS_ID number(10,0) not null, DERIVATIVE_ID number(38) not null, NUM_ANOMALOUS number(38) null, NUM_CENTRIC number(38) null, NUM_ACENTRIC number(38) null, NUM_OF_SITES number(38) null, POWER_CENTRIC number(8,0) null, POWER_ACENTRIC number(8,0) null, RCULLIS_ACENTRIC number(8,0) null, RCULLIS_ANOMALOUS number(8,0) null, RCULLIS_CENTRIC number(8,0) null, D_RES_HIGH number(8,0) null, D_RES_LOW number(8,0) null, REFLNS_CRITERIA varchar2(80) null, DETAILS varchar2(1000) null ) ;

create table DEP_MIR ( DPL_DPL_ID number(10,0) not null, DM_ID number(10,0) not null, DDS_DDS_ID number(10,0) not null, NUM_PHASED_ACENTRIC number(38) null, NUM_PHASED_CENTRIC number(38) null, NUM_PHASED_ALL number(38) null, FOM number(8,0) null, FOM_ACENTRIC number(8,0) null, FOM_CENTRIC number(8,0) null, D_RES_HIGH number(8,0) null, D_RES_LOW number(8,0) null, REFLNS_CRITERIA varchar2(80) null, MIR_METHOD varchar2(80) null, DETAILS varchar2(2000) null ) ;

create table DEP_DER_SITE ( DMD_DMD_ID number(10,0) not null, SITE_ID varchar2(8) not null, DDS2_ID number(10,0) not null, OCCUPANCY_ISO number(8,0) null, OCCUPANCY_ISO_ESD number(8,0) null, OCCUPANCY_ANOM number(8,0) null, OCCUPANCY_ANOM_ESD number(8,0) null, B_ISO number(8,0) null, B_ISO_ESD number(8,0) null, CARTN_X number(8,0) null, CARTN_X_ESD number(8,0) null, CARTN_Y number(8,0) null, CARTN_Y_ESD number(8,0) null, CARTN_Z number(8,0) null, CARTN_Z_ESD number(8,0) null, ELEMENT varchar2(2) null, DETAILS varchar2(80) null ) ;


alter table REF_H_LS_TREATMENT add (constraint RHLT_PK primary key (RHLT_ID)) alter table REF_H_LS_TREATMENT add ( constraint RHLT_RHLT1_UK unique (HTREATMENT_ID)) alter table REF_PHASING_METHOD add (constraint RPM_PK primary key (RPM_ID)) alter table REF_PHASING_METHOD add ( constraint RPM_RPM1_UK unique (METHOD_ID)) alter table DEP_HKLF_MIR_DER add (constraint DHMD_PK primary key (DHMD_ID)) alter table DEP_HKLF_MIR_DER add ( constraint DHMD_DHMD1_UK unique (H ,K ,L)) alter table DEP_HKLF_MIR_DER add constraint DHMD_DMD_FK foreign key (DMD_DMD_ID) references DEP_MIR_DER (DMD_ID) on delete cascade alter table DEP_MIR_SHELL add (constraint DMS_PK primary key (DMS_ID)) alter table DEP_MIR_SHELL add ( constraint DMS_DMS1_UK unique (DM_DM_ID ,SHELL_SERIAL)) alter table DEP_MIR_SHELL add constraint DMS_DM_FK foreign key (DM_DM_ID) references DEP_MIR (DM_ID) on delete cascade alter table DEP_MIR_DER_SHELL add (constraint DMDS_PK primary key (DMDS_ID)) alter table DEP_MIR_DER_SHELL add ( constraint DMDS_DMDS1_UK unique (DMD_DMD_ID ,SHELL_SERIAL)) alter table DEP_MIR_DER_SHELL add constraint DMDS_DMD_FK foreign key (DMD_DMD_ID) references DEP_MIR_DER (DMD_ID) on delete cascade alter table DEP_MIR_DER add (constraint DMD_PK primary key (DMD_ID)) alter table DEP_MIR_DER add ( constraint DMD_DMD1_UK unique (DDS_DDS_ID,DPL_DPL_ID,DERIVATIVE_ID)) alter table DEP_MIR_DER add constraint DMD_DPL_FK foreign key (DPL_DPL_ID) references DEP_PHASING_LIST (DPL_ID) on delete cascade add constraint DMD_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade alter table DEP_MIR add (constraint DM_PK primary key (DM_ID)) alter table DEP_MIR add ( constraint DM_DM1_UK unique (DDS_DDS_ID ,DPL_DPL_ID)) alter table DEP_MIR add constraint DM_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade add constraint DM_DPL_FK foreign key (DPL_DPL_ID) references DEP_PHASING_LIST (DPL_ID) on delete cascade alter table DEP_DER_SITE add (constraint DDS2_PK primary key (DDS2_ID)) alter table DEP_DER_SITE add ( constraint DDS2_DDS21_UK unique (DMD_DMD_ID ,SITE_ID)) alter table DEP_DER_SITE add constraint DDS2_DMD_FK foreign key (DMD_DMD_ID) references DEP_MIR_DER (DMD_ID) on delete cascade