-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_sipm_vendor_data_table.sql
151 lines (136 loc) · 4.57 KB
/
create_sipm_vendor_data_table.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
To be run as CMS_MTD_CORE_COND
*/
INSERT INTO CMS_MTD_CORE_COND.KINDS_OF_CONDITIONS (NAME, IS_RECORD_DELETED, EXTENSION_TABLE_NAME, COMMENT_DESCRIPTION) VALUES ('SIPM VENDOR DATA', 'F', 'SIPM_VENDOR_DATA', 'Data provided by the vendor');
/*
To be run as CMS_MTD_TMING_COND
*/
DROP TABLE CMS_MTD_TMING_COND.SIPM_VENDOR_DATA CASCADE CONSTRAINTS;
CREATE TABLE CMS_MTD_TMING_COND.SIPM_VENDOR_DATA
(
RECORD_ID NUMBER(38) NOT NULL,
CONDITION_DATA_SET_ID NUMBER(38) NOT NULL,
RAC NUMBER NOT NULL,
VBRRT_0 NUMBER NOT NULL,
VBRRT_1 NUMBER NOT NULL,
VBRRT_2 NUMBER NOT NULL,
VBRRT_3 NUMBER NOT NULL,
VBRRT_4 NUMBER NOT NULL,
VBRRT_5 NUMBER NOT NULL,
VBRRT_6 NUMBER NOT NULL,
VBRRT_7 NUMBER NOT NULL,
VBRRT_8 NUMBER NOT NULL,
VBRRT_9 NUMBER NOT NULL,
VBRRT_10 NUMBER NOT NULL,
VBRRT_11 NUMBER NOT NULL,
VBRRT_12 NUMBER NOT NULL,
VBRRT_13 NUMBER NOT NULL,
VBRRT_14 NUMBER NOT NULL,
VBRRT_15 NUMBER NOT NULL,
RTDR NUMBER NOT NULL,
DARKI3V_0 NUMBER NOT NULL,
DARKI3V_1 NUMBER NOT NULL,
DARKI3V_2 NUMBER NOT NULL,
DARKI3V_3 NUMBER NOT NULL,
DARKI3V_4 NUMBER NOT NULL,
DARKI3V_5 NUMBER NOT NULL,
DARKI3V_6 NUMBER NOT NULL,
DARKI3V_7 NUMBER NOT NULL,
DARKI3V_8 NUMBER NOT NULL,
DARKI3V_9 NUMBER NOT NULL,
DARKI3V_10 NUMBER NOT NULL,
DARKI3V_11 NUMBER NOT NULL,
DARKI3V_12 NUMBER NOT NULL,
DARKI3V_13 NUMBER NOT NULL,
DARKI3V_14 NUMBER NOT NULL,
DARKI3V_15 NUMBER NOT NULL,
DARKI5V_0 NUMBER NOT NULL,
DARKI5V_1 NUMBER NOT NULL,
DARKI5V_2 NUMBER NOT NULL,
DARKI5V_3 NUMBER NOT NULL,
DARKI5V_4 NUMBER NOT NULL,
DARKI5V_5 NUMBER NOT NULL,
DARKI5V_6 NUMBER NOT NULL,
DARKI5V_7 NUMBER NOT NULL,
DARKI5V_8 NUMBER NOT NULL,
DARKI5V_9 NUMBER NOT NULL,
DARKI5V_10 NUMBER NOT NULL,
DARKI5V_11 NUMBER NOT NULL,
DARKI5V_12 NUMBER NOT NULL,
DARKI5V_13 NUMBER NOT NULL,
DARKI5V_14 NUMBER NOT NULL,
DARKI5V_15 NUMBER NOT NULL,
IS_0 NUMBER NOT NULL,
IS_1 NUMBER NOT NULL,
IS_2 NUMBER NOT NULL,
IS_3 NUMBER NOT NULL,
IS_4 NUMBER NOT NULL,
IS_5 NUMBER NOT NULL,
IS_6 NUMBER NOT NULL,
IS_7 NUMBER NOT NULL,
IS_8 NUMBER NOT NULL,
IS_9 NUMBER NOT NULL,
IS_10 NUMBER NOT NULL,
IS_11 NUMBER NOT NULL,
IS_12 NUMBER NOT NULL,
IS_13 NUMBER NOT NULL,
IS_14 NUMBER NOT NULL,
IS_15 NUMBER NOT NULL,
RQ_0 NUMBER NOT NULL,
RQ_1 NUMBER NOT NULL,
RQ_2 NUMBER NOT NULL,
RQ_3 NUMBER NOT NULL,
RQ_4 NUMBER NOT NULL,
RQ_5 NUMBER NOT NULL,
RQ_6 NUMBER NOT NULL,
RQ_7 NUMBER NOT NULL,
RQ_8 NUMBER NOT NULL,
RQ_9 NUMBER NOT NULL,
RQ_10 NUMBER NOT NULL,
RQ_11 NUMBER NOT NULL,
RQ_12 NUMBER NOT NULL,
RQ_13 NUMBER NOT NULL,
RQ_14 NUMBER NOT NULL,
RQ_15 NUMBER NOT NULL
)
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 10M
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
)
LOGGING
NOCOMPRESS
NOCACHE;
CREATE UNIQUE INDEX CMS_MTD_TMING_COND.SPM_VNDR_DT_PK ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA (RECORD_ID);
ALTER TABLE CMS_MTD_TMING_COND.SIPM_VENDOR_DATA ADD (
CONSTRAINT SPM_VNDR_DT_PK
PRIMARY KEY
(RECORD_ID)
USING INDEX CMS_MTD_TMING_COND.SPM_VNDR_DT_PK
ENABLE VALIDATE);
CREATE INDEX CMS_MTD_TMING_COND.SPM_VNDR_DT_FK_I ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA (CONDITION_DATA_SET_ID);
ALTER TABLE CMS_MTD_TMING_COND.SIPM_VENDOR_DATA ADD (
CONSTRAINT SPM_VNDR_DT_FK
FOREIGN KEY (CONDITION_DATA_SET_ID)
REFERENCES CMS_MTD_CORE_COND.COND_DATA_SETS (CONDITION_DATA_SET_ID)
ENABLE VALIDATE);
GRANT SELECT ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA TO CMS_MTD_TMING_CONDITION_READER;
GRANT SELECT ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA TO PUBLIC;
GRANT INSERT ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA TO CMS_MTD_CORE_CONDITION_WRITER;
GRANT UPDATE ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA TO CMS_MTD_CORE_CONDITION_WRITER;
GRANT INSERT ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA TO CMS_MTD_PRTYP_TMING_WRT;
GRANT UPDATE ON CMS_MTD_TMING_COND.SIPM_VENDOR_DATA TO CMS_MTD_PRTYP_TMING_WRT;
INSERT INTO CMS_MTD_CORE_COND.COND_TO_PART_RLTNSHPS
(KIND_OF_PART_ID, KIND_OF_CONDITION_ID, DISPLAY_NAME, IS_RECORD_DELETED)
VALUES ((SELECT KIND_OF_PART_ID FROM CMS_MTD_CORE_CONSTRUCT.KINDS_OF_PARTS WHERE
DISPLAY_NAME = 'SiPMArray' AND IS_RECORD_DELETED = 'F'),
(SELECT KIND_OF_CONDITION_ID FROM
CMS_MTD_CORE_COND.KINDS_OF_CONDITIONS WHERE EXTENSION_TABLE_NAME = 'SIPM_VENDOR_DATA' AND
NAME = 'SIPM VENDOR DATA'), 'Data provided by the vendor for SiPM Array', 'F');