Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:11

0001 REM
0002 REM Table NOISEMATRIX
0003 REM
0004 create table NOISEMATRIX (
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 NOISEMATRIX
0011 REM
0012 alter table NOISEMATRIX
0013   add constraint noisematrix_run_pk primary key (record_id);
0014 
0015 REM
0016 REM Table NOISEMATRIX_MAP
0017 REM
0018 create table NOISEMATRIX_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 NOISEMATRIX_MAP
0025 REM
0026 alter table NOISEMATRIX_MAP add (
0027    constraint noisematrix_map_pk primary key (map_id),
0028    unique (record_id,map_index),
0029    unique (record_id,layer_id),
0030    constraint noisematrix_map_fk foreign key (record_id)
0031                           references noisematrix(record_id));
0032 
0033 REM
0034 REM Table NOISEMATRIX_DATA
0035 REM
0036 create table NOISEMATRIX_DATA (
0037 map_id      number NOT NULL,
0038 vec_index   number(5) NOT NULL,
0039 elem33      number(15,6) NOT NULL,
0040 elem34      number(15,6) NOT NULL,
0041 elem35      number(15,6) NOT NULL,
0042 elem44      number(15,6) NOT NULL,
0043 elem45      number(15,6) NOT NULL,
0044 elem46      number(15,6) NOT NULL,
0045 elem55      number(15,6) NOT NULL,
0046 elem56      number(15,6) NOT NULL,
0047 elem57      number(15,6) NOT NULL,
0048 elem66      number(15,6) NOT NULL,
0049 elem67      number(15,6) NOT NULL,
0050 elem77      number(15,6) NOT NULL);
0051 REM
0052 REM Adding constraints for table NOISEMATRIX_DATA
0053 REM
0054 alter table NOISEMATRIX_DATA add (
0055    constraint noisematrix_data_pk primary key (map_id,vec_index),
0056    constraint noisematrix_data_fk foreign key (map_id)
0057                           references noisematrix_map(map_id));