Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 REM
0002 REM Table PEDESTALS
0003 REM
0004 create table PEDESTALS (
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 PEDESTALS
0011 REM
0012 alter table PEDESTALS
0013   add constraint ped_run_pk primary key (record_id);
0014 
0015 REM
0016 REM Table PEDESTASLS_MAP
0017 REM
0018 create table PEDESTALS_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 PEDESTALS_MAP
0025 REM
0026 alter table PEDESTALS_MAP add (
0027    constraint ped_map_pk primary key (map_id),
0028    unique (record_id,map_index),
0029    unique (record_id,layer_id),
0030    constraint ped_map_fk foreign key (record_id)
0031                          references pedestals(record_id));
0032 
0033 REM
0034 REM Table PEDESTALS_DATA
0035 REM
0036 create table PEDESTALS_DATA (
0037 map_id     number NOT NULL,
0038 vec_index  number(5) NOT NULL,
0039 ped        binary_float NOT NULL,
0040 rms        binary_float NOT NULL);
0041 REM
0042 REM Adding constraints for table PEDESTALS_DATA
0043 REM
0044 alter table PEDESTALS_DATA add (
0045    constraint ped_data_pk primary key (map_id,vec_index),
0046    constraint ped_data_fk foreign key (map_id)
0047                           references pedestals_map(map_id));