Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:15

0001 REM
0002 REM Table GAINS
0003 REM
0004 create table GAINS (
0005 record_id         number NOT NULL,
0006 run_num           number UNIQUE NOT NULL,
0007 data_taking_time  date DEFAULT sysdate NOT NULL,
0008 insertion_time    date DEFAULT sysdate NOT NULL);
0009 REM
0010 REM Adding constraints for table GAINS
0011 REM
0012 alter table GAINS
0013   add constraint gain_run_pk primary key (record_id);
0014 
0015 REM
0016 REM Table GAINS_MAP
0017 REM
0018 create table GAINS_MAP (
0019 map_id      number NOT NULL,
0020 record_id   number NOT NULL,
0021 map_index   number NOT NULL,
0022 layer_id    number NOT NULL);
0023 REM
0024 REM Adding constraints for table GAINS_MAP
0025 REM
0026 alter table GAINS_MAP add (
0027    constraint gain_map_pk primary key (map_id),
0028    unique (record_id,map_index),
0029    unique (record_id,layer_id),
0030    constraint gain_map_fk foreign key (record_id)
0031                           references gains(record_id));
0032 
0033 REM
0034 REM Table GAINS_DATA
0035 REM
0036 create table GAINS_DATA (
0037 map_id         number NOT NULL,
0038 vec_index      number(5) NOT NULL,
0039 gain_slope     binary_float NOT NULL,
0040 gain_intercept binary_float NOT NULL,
0041 gain_chi2      binary_float NOT NULL);
0042 REM
0043 REM Adding constraints for table GAINS_DATA
0044 REM
0045 alter table GAINS_DATA add (
0046    constraint gain_data_pk primary key (map_id,vec_index),
0047    constraint gain_data_fk foreign key (map_id)
0048                           references gains_map(map_id));