HKL


 table DEP_DATA_REDUCTION 
 table DEP_REFLNS_SHELL 
 table DEP_HKLF  
 table DEP_REFLN_STATS  
 table DEP_SYS_ABS    
 table DEP_PHASING_LIST    
 table DEP_REFLNS_I_SHELL  
 table DEP_HKLF_CALC   


create table DEP_DATA_REDUCTION ( DDR_ID number(10,0) not null, DDS_DDS_ID number(10,0) not null, REPM_REPM_ID number(10,0) null, CRITERION_ID varchar2(80) null, DETAILS varchar2(1000) null ) ;

create table DEP_REFLNS_SHELL ( SHELL_SERIAL number(38) not null, DDS_DDS_ID number(10,0) not null, DRS_ID number(10,0) not null, PERCENT_POSSIBLE_ALL_CUMULATIV number(8,0) null, RMERGE_I_ALL_CUMULATIVE number(8,0) null ) ;

create table DEP_HKLF ( DH_ID number(10,0) not null, DEP_DEP_ID number(10,0) not null, DDS_DDS_ID number(10,0) not null, INDEX_H number(38) not null, INDEX_K number(38) not null, INDEX_L number(38) not null, RHRS_RHRS_ID number(10,0) null, REFINE_FLAG varchar2(1) null, SYMM_MULT number(38) null, EPSILON number(38) null, F_MEAS number(8,0) null, F_MEAS_SIGMA number(8,0) null, F_MEAS_SIGMA_AU number(8,0) null, F_SQUARED_MEAS number(8,0) null, F_SQUARED_SIGMA number(8,0) null, ST_LAMBDA number(8,0) null, F_MEAS_AU number(8,0) null ) ;

create table DEP_REFLN_STATS ( DRS1_ID number(10,0) not null, DDS_DDS_ID number(10,0) null, DRS_DRS_ID number(10,0) null, D_RES_HIGH number(8,0) null, D_RES_LOW number(8,0) null, MAX_INTENSITY number(8,0) null, MIN_INTENSITY number(8,0) null, INTENSITY_RMS_FULLY number(8,0) null, INTENSITY_RMS_PARTIAL number(8,0) null, MEANI_OVER_SD_ALL number(8,0) null, MEANI_OVER_SIGI_ALL number(8,0) null, MEANI_OVER_SIGI_OBS number(8,0) null, MEANF_OVER_SIGF_ALL number(8,0) null, MEANF_OVER_SIGF_OBS number(8,0) null, MEAN_SCATTER_OVER_SD_FULL number(8,0) null, MEAN_FRACT_BIAS number(8,0) null, MEAN_SCATTER_OVER_SD_PART number(8,0) null, MULTIPLICITY number(8,0) null, PCV number(8,0) null, PCV_MEAN number(8,0) null, PERCENT_POSSIBLE_ALL number(8,0) null, PERCENT_POSSIBLE_OBS number(8,0) null, RMEAS number(8,0) null, RMEAS_MEAN number(8,0) null, RMERGE_F_ALL number(8,0) null, RMERGE_F_OBS number(8,0) null, RMERGE_I_ALL number(8,0) null, RMERGE_I_OBS number(8,0) null, SIGMA_SCATTER_OVER_SD_FULL number(8,0) null, RMERGE_I_ANOM_ALL number(8,0) null, SIGMA_SCATTER_OVER_SD_PART number(8,0) null, ANOM_DIFF_PERCENT_MEAS number(8,0) null, NUM_POSSIBLE number(38) null, NUM_ALL number(38) null, NUM_OBS number(38) null, NUM_UNIQUE_ALL number(38) null, NUM_UNIQUE_OBS number(38) null, NUM_CENTRIC_ALL number(38) null, NUM_ANOMALOUS_ALL number(38) null, NUM_FRACT_BIAS_IN_MEAN number(38) null, NUM_FULLY_MEASURED number(38) null, NUM_MEASURED_ALL number(38) null, NUM_PARTIALS_MEASURED number(38) null ) ;

create table DEP_SYS_ABS ( DDS_DDS_ID number(10,0) not null, DSA_ID number(10,0) not null, H number(38) not null, K number(38) not null, L number(38) not null, I number(38) null, SIGMAI number(38) null, I_OVER_SIGMAI number(8,0) null ) ;

create table DEP_PHASING_LIST ( PHASING_ID number(38) not null, DEP_DEP_ID number(10,0) not null, DPL_ID number(10,0) not null, RPM_RPM_ID number(10,0) null ) ;

create table DEP_REFLNS_I_SHELL ( DRS_DRS_ID number(10,0) not null, DRIS_ID number(10,0) not null, Z number(8,0) not null, NZ_CENTRIC_THEORY number(8,0) null, NZ_CENTRIC_OBSERVED number(8,0) null, NZ_ACENTRIC_OBSERVED number(8,0) null, NZ_ACENTRIC_THEORY number(8,0) null ) ;

create table DEP_HKLF_CALC ( DDS_DDS_ID number(10,0) not null, DHC_ID number(10,0) not null, INDEX_H number(38) not null, INDEX_K number(38) not null, INDEX_L number(38) not null, PHASE_MEAS number(8,0) null, PHASE_CALC number(8,0) null, F_CALC number(8,0) null, F_CALC_AU number(8,0) null, F_SQUARED_CALC number(8,0) null, FOM number(8,0) null, I_CALC number(8,0) null, I_MEAS number(8,0) null, I_SIGMA number(8,0) null, A_MEAS number(8,0) null, A_MEAS_AU number(8,0) null, A_CALC number(8,0) null, A_CALC_AU number(8,0) null, B_CALC number(8,0) null, B_CALC_AU number(8,0) null, B_MEAS number(8,0) null, B_MEAS_AU number(8,0) null ) ;


alter table DEP_DATA_REDUCTION add (constraint DDR_PK primary key (DDR_ID)) alter table DEP_DATA_REDUCTION add ( constraint DDR_DDR1_UK unique (DDS_DDS_ID)) alter table DEP_DATA_REDUCTION add constraint DDR_REPM_FK foreign key (REPM_REPM_ID) references REF_EXP_PROC_METH (REPM_ID) on delete cascade add constraint DDR_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade alter table DEP_REFLNS_SHELL add (constraint DRS_PK primary key (DRS_ID)) alter table DEP_REFLNS_SHELL add ( constraint DRS_DRS1_UK unique (SHELL_SERIAL ,DDS_DDS_ID)) alter table DEP_REFLNS_SHELL add constraint DRS_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade alter table DEP_HKLF add (constraint DH_PK primary key (DH_ID)) alter table DEP_HKLF add ( constraint DH_DH1_UK unique (DDS_DDS_ID,INDEX_H,INDEX_K ,INDEX_L)) alter table DEP_HKLF add constraint DH_RHRS_FK foreign key (RHRS_RHRS_ID) references REF_HKLF_REFINE_STATUS (RHRS_ID) on delete cascade add constraint DH_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade add constraint DH_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_REFLN_STATS add (constraint DRS1_PK primary key (DRS1_ID)) alter table DEP_REFLN_STATS add ( constraint DRS1_DRS11_UK unique (DDS_DDS_ID ,DRS_DRS_ID)) alter table DEP_REFLN_STATS add constraint DRS1_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade add constraint DRS1_DRS_FK foreign key (DRS_DRS_ID) references DEP_REFLNS_SHELL (DRS_ID) on delete cascade alter table DEP_SYS_ABS add (constraint DSA_PK primary key (DSA_ID)) alter table DEP_SYS_ABS add ( constraint DSA_DSA1_UK unique (DDS_DDS_ID ,H ,K ,L)) alter table DEP_SYS_ABS add constraint DSA_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade alter table DEP_PHASING_LIST add (constraint DPL_PK primary key (DPL_ID)) alter table DEP_PHASING_LIST add ( constraint DPL_DPL1_UK unique (DEP_DEP_ID ,PHASING_ID)) alter table DEP_PHASING_LIST add constraint DPL_RPM_FK foreign key (RPM_RPM_ID) references REF_PHASING_METHOD (RPM_ID) on delete cascade add constraint DPL_DEP_FK foreign key (DEP_DEP_ID ) references DEPOSITION (DEP_ID ) on delete cascade alter table DEP_REFLNS_I_SHELL add (constraint DRIS_PK primary key (DRIS_ID)) alter table DEP_REFLNS_I_SHELL add ( constraint DRIS_DRIS1_UK unique (DRS_DRS_ID ,Z)) alter table DEP_REFLNS_I_SHELL add constraint DRIS_DRS_FK foreign key (DRS_DRS_ID) references DEP_REFLNS_SHELL (DRS_ID) on delete cascade alter table DEP_HKLF_CALC add (constraint DHC_PK primary key (DHC_ID)) alter table DEP_HKLF_CALC add ( constraint DHC_DHC1_UK unique (DDS_DDS_ID ,INDEX_H ,INDEX_K ,INDEX_L)) alter table DEP_HKLF_CALC add constraint DHC_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade alter table DEP_HKLF_LAUE add ( constraint DHL_DHL1_UK unique (DDS_DDS_ID ,INDEX_H ,INDEX_K ,INDEX_L)) alter table DEP_HKLF_LAUE add constraint DHL_DDS_FK foreign key (DDS_DDS_ID) references DEP_DATA_SET (DDS_ID) on delete cascade