/[PAMELA software]/YodaProfiler/docs/PAMELAProductionDB.sql
ViewVC logotype

Annotation of /YodaProfiler/docs/PAMELAProductionDB.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Mon Apr 16 12:35:52 2007 UTC (17 years, 7 months ago) by mocchiut
Branch: MAIN
Changes since 1.10: +5 -0 lines
Updated Resurs time zero

1 mocchiut 1.1 DROP DATABASE IF EXISTS dbname;
2    
3     CREATE DATABASE dbname;
4    
5     USE dbname;
6    
7 mocchiut 1.6 SET time_zone='+0:00';
8    
9 mocchiut 1.3 CREATE TABLE `_RUNID_GEN` (
10     `ID` int(10) unsigned NOT NULL auto_increment,
11     PRIMARY KEY (`ID`)
12     ) ENGINE=InnoDB;
13    
14 mocchiut 1.1 CREATE TABLE `GL_RAW` (
15     `ID` int(10) unsigned NOT NULL auto_increment,
16     `PATH` varchar(255) NOT NULL default '',
17     `NAME` varchar(255) NOT NULL default '',
18     `BOOT_NUMBER` smallint(5) unsigned default NULL,
19     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
20     PRIMARY KEY (`ID`),
21     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
22     KEY `PATH_index` (`PATH`)
23     ) ENGINE=InnoDB;
24    
25 mocchiut 1.8 INSERT INTO GL_RAW VALUES(0,'path to','level2 files',NULL,NULL);
26 mocchiut 1.7
27 mocchiut 1.1 CREATE TABLE `GL_ROOT` (
28     `ID` int(10) unsigned NOT NULL auto_increment,
29     `ID_RAW` int(10) unsigned NOT NULL default '0',
30     `ID_TIMESYNC` int(10) unsigned NOT NULL default '0',
31     `PATH` varchar(255) NOT NULL default '',
32     `NAME` varchar(255) NOT NULL default '',
33     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
34     PRIMARY KEY (`ID`),
35     KEY `ID_RAW_index` (`ID_RAW`),
36     KEY `PATH_index` (`PATH`),
37     CONSTRAINT `ROOT_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE
38     ) ENGINE=InnoDB;
39    
40     CREATE TABLE `GL_RESURS_OFFSET` (
41     `ID` int(10) unsigned NOT NULL auto_increment,
42 mocchiut 1.3 `FROM_ORBIT` int(10) unsigned NOT NULL default '0',
43     `SPECIAL_FILE` varchar(255) NOT NULL default '',
44 mocchiut 1.1 `OFFSET_DATE` timestamp default '0000-00-00 00:00:00',
45     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
46     PRIMARY KEY (`ID`)
47     ) ENGINE=InnoDB;
48    
49 mocchiut 1.3 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','','2006-06-14 21:00:00',NULL);
50     INSERT INTO GL_RESURS_OFFSET VALUES(0,'1619','','2006-09-28 21:00:00',NULL);
51 mocchiut 1.9 INSERT INTO GL_RESURS_OFFSET VALUES(0,'2797','','2006-12-12 21:00:00',NULL);
52 mocchiut 1.10 INSERT INTO GL_RESURS_OFFSET VALUES(0,'3221','','2007-01-08 21:00:00',NULL);
53 mocchiut 1.11 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_002_001_cln1.pam','2007-01-08 21:00:00',NULL);
54     INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_003_001_cln1.pam','2007-01-08 21:00:00',NULL);
55     INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_002_001_cln1.pam','2007-01-08 21:00:00',NULL);
56     INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_003_001_cln1.pam','2007-01-08 21:00:00',NULL);
57     INSERT INTO GL_RESURS_OFFSET VALUES(0,'4576','','2007-04-08 21:00:00',NULL);
58 mocchiut 1.1
59     CREATE TABLE `GL_TIMESYNC` (
60     `ID` int(10) unsigned NOT NULL auto_increment,
61     `ID_RAW` int(10) unsigned NOT NULL default '0',
62     `OBT0` int(10) unsigned NOT NULL default '0',
63     `TIMESYNC` int(10) unsigned NOT NULL default '0',
64     `TYPE` smallint(5) unsigned NOT NULL default '0',
65     PRIMARY KEY (`ID`),
66     KEY `ID_RAW_index` (`ID_RAW`),
67     KEY `TYPE_index` (`TYPE`),
68     CONSTRAINT `TIME_RAW_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE
69     ) ENGINE=InnoDB;
70    
71     CREATE TABLE `GL_PARAM` (
72     `ID` int(10) unsigned NOT NULL auto_increment,
73     `PATH` varchar(255) NOT NULL default '',
74     `NAME` varchar(255) NOT NULL default '',
75     `FROM_TIME` int(10) unsigned NOT NULL default '0',
76     `TO_TIME` int(10) unsigned NOT NULL default '0',
77 mocchiut 1.2 `TYPE` smallint(5) unsigned NOT NULL default '0',
78 mocchiut 1.1 `DESCR` varchar(255) NOT NULL default '',
79     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
80     PRIMARY KEY (`ID`),
81     KEY `PATH_index` (`PATH`),
82     KEY `NAME_index` (`NAME`),
83     KEY `TYPE_index` (`TYPE`),
84     KEY `DESCR_index` (`DESCR`)
85     ) ENGINE=InnoDB;
86    
87     CREATE TABLE `GL_TLE` (
88     `ID` int(10) NOT NULL auto_increment,
89     `TLE1` varchar(255) NOT NULL default '',
90     `TLE2` varchar(255) NOT NULL default '',
91     `TLE3` varchar(255) NOT NULL default '',
92 mocchiut 1.2 `FROM_TIME` datetime NOT NULL default '0000-00-00 00:00:00',
93 mocchiut 1.1 `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
94     PRIMARY KEY (`ID`)
95     ) ENGINE=InnoDB;
96    
97     CREATE TABLE `GL_RUN` (
98     `ID` int(10) unsigned NOT NULL auto_increment,
99     `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
100     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
101     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
102     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
103     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
104     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
105     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
106     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
107     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
108     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
109     `EV_FROM` int(10) unsigned NOT NULL default '0',
110     `EV_TO` int(10) unsigned NOT NULL default '0',
111     `NEVENTS` int(10) unsigned NOT NULL default '0',
112     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
113     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
114     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
115     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
116     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
117     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
118     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
119     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
120     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
121     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
122     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
123     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
124     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
125     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
126     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
127     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
128     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
129     PRIMARY KEY (`ID`),
130     KEY `ID_RUN_FRAG_index` (`ID_RUN_FRAG`),
131     KEY `ID_ROOT_L0_index` (`ID_ROOT_L0`),
132     KEY `ID_ROOT_L2_index` (`ID_ROOT_L2`),
133     KEY `COMPILATIONTS_index` (`COMPILATIONTIMESTAMP`),
134     KEY `VALID_index` (`VALIDATION`),
135     KEY `TRKCALIB_index` (`TRK_CALIB_USED`),
136     KEY `CALDSPMASK_index` (`CAL_DSP_MASK`),
137     KEY `EFF_WS_index` (`EFF_WRK_SCHEDULE`),
138     KEY `FAV_WS_index` (`FAV_WRK_SCHEDULE`),
139     KEY `RM_ACQ_AFTER_CALIB_index` (`RM_ACQ_AFTER_CALIB`),
140     KEY `RM_ACQ_SETTING_MODE_index` (`RM_ACQ_SETTING_MODE`),
141     KEY `ACQ_VAR_INFO_index` (`ACQ_VAR_INFO`),
142     KEY `TRG_MODE_A_index` (`PRH_VAR_TRG_MODE_A`),
143     KEY `TRG_MODE_B_index` (`PRH_VAR_TRG_MODE_B`),
144     KEY `NEVENTS_index` (`NEVENTS`),
145     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
146     KEY `ID_RUN_fk_constraint` (`ID_ROOT_L0`),
147 mocchiut 1.5 KEY `ID_RUN_L2_fk_constraint` (`ID_ROOT_L2`)
148 mocchiut 1.1 ) ENGINE=InnoDB;
149    
150     CREATE TABLE `GL_RUN_FRAGMENTS` (
151     `ID` int(10) unsigned NOT NULL auto_increment,
152     `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
153     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
154     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
155     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
156     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
157     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
158     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
159     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
160     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
161     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
162     `EV_FROM` int(10) unsigned NOT NULL default '0',
163     `EV_TO` int(10) unsigned NOT NULL default '0',
164     `NEVENTS` int(10) unsigned NOT NULL default '0',
165     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
166     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
167     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
168     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
169     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
170     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
171     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
172     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
173     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
174     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
175     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
176     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
177     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
178     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
179     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
180     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
181     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
182     PRIMARY KEY (`ID`),
183     KEY `ID_RUN_FRAG_index` (`ID_RUN_FRAG`),
184     KEY `ID_ROOT_L0_index` (`ID_ROOT_L0`),
185     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
186     KEY `TRKCALIB_index` (`TRK_CALIB_USED`),
187 mocchiut 1.5 KEY `NID_RUN_fk_constraint` (`ID_ROOT_L0`)
188 mocchiut 1.1 ) ENGINE=InnoDB;
189    
190 mocchiut 1.4 CREATE TABLE `GL_RUN_TRASH` (
191 mocchiut 1.5 `ID_TRASH` int(10) unsigned NOT NULL auto_increment,
192     `ID` int(10) unsigned NOT NULL default '0',
193 mocchiut 1.4 `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
194     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
195     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
196     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
197     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
198     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
199     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
200     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
201     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
202     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
203     `EV_FROM` int(10) unsigned NOT NULL default '0',
204     `EV_TO` int(10) unsigned NOT NULL default '0',
205     `NEVENTS` int(10) unsigned NOT NULL default '0',
206     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
207     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
208     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
209     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
210     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
211     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
212     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
213     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
214     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
215     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
216     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
217     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
218     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
219     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
220     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
221     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
222     `FILENAMEL0` varchar(255) NOT NULL default '',
223     `FILENAMEL2` varchar(255) NOT NULL default '',
224     `BELONGED_TO` varchar(255) NOT NULL default '',
225     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
226 mocchiut 1.5 PRIMARY KEY (`ID_TRASH`),
227 mocchiut 1.4 KEY `TID_RUN_FRAG_index` (`ID_RUN_FRAG`),
228     KEY `TID_ROOT_L0_index` (`ID_ROOT_L0`),
229     KEY `TBOOTNUMBER_index` (`BOOT_NUMBER`),
230     KEY `TTRKCALIB_index` (`TRK_CALIB_USED`),
231     KEY `TFNAME0_index` (`FILENAMEL0`),
232     KEY `TFNAME2_index` (`FILENAMEL2`),
233     KEY `TBELONG_index` (`BELONGED_TO`)
234     ) ENGINE=InnoDB;
235    
236 mocchiut 1.1 CREATE TABLE `GL_CALO_CALIB` (
237     `ID` int(10) unsigned NOT NULL auto_increment,
238     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
239     `EV_ROOT` int(10) unsigned NOT NULL default '0',
240     `FROM_TIME` int(10) unsigned NOT NULL default '0',
241     `TO_TIME` int(10) unsigned NOT NULL default '0',
242     `SECTION` tinyint(3) unsigned NOT NULL default '0',
243     `OBT` int(10) unsigned NOT NULL default '0',
244     `PKT` int(10) unsigned NOT NULL default '0',
245     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
246     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
247     PRIMARY KEY (`ID`),
248     KEY `SECTION_index` (`SECTION`),
249     KEY `EV_ROOT_index` (`EV_ROOT`),
250     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
251     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
252 mocchiut 1.5 KEY `VALID1_index` (`VALIDATION`)
253 mocchiut 1.1 ) ENGINE=InnoDB;
254    
255     CREATE TABLE `GL_TRK_CALIB` (
256     `ID` int(10) unsigned NOT NULL auto_increment,
257     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
258     `EV_ROOT_CALIBTRK1` int(10) unsigned default NULL,
259     `EV_ROOT_CALIBTRK2` int(10) unsigned default NULL,
260     `FROM_TIME` int(10) unsigned NOT NULL default '0',
261     `TO_TIME` int(10) unsigned NOT NULL default '0',
262     `OBT1` int(10) unsigned NOT NULL default '0',
263     `PKT1` int(10) unsigned NOT NULL default '0',
264     `OBT2` int(10) unsigned NOT NULL default '0',
265     `PKT2` int(10) unsigned NOT NULL default '0',
266     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
267     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
268     PRIMARY KEY (`ID`),
269     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
270     KEY `EV_ROOT_CALIBTRK1index` (`EV_ROOT_CALIBTRK1`),
271     KEY `EV_ROOT_CALIBTRK2index` (`EV_ROOT_CALIBTRK2`),
272     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
273 mocchiut 1.5 KEY `VALID2_index` (`VALIDATION`)
274 mocchiut 1.1 ) ENGINE=InnoDB;
275    
276     CREATE TABLE `GL_S4_CALIB` (
277     `ID` int(10) unsigned NOT NULL auto_increment,
278     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
279     `EV_ROOT` int(10) unsigned NOT NULL default '0',
280     `FROM_TIME` int(10) unsigned NOT NULL default '0',
281     `TO_TIME` int(10) unsigned NOT NULL default '0',
282     `OBT` int(10) unsigned NOT NULL default '0',
283     `PKT` int(10) unsigned NOT NULL default '0',
284     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
285     PRIMARY KEY (`ID`),
286     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
287 mocchiut 1.5 KEY `BOOTNUMBER_index` (`BOOT_NUMBER`)
288 mocchiut 1.1 ) ENGINE=InnoDB;
289    
290    

  ViewVC Help
Powered by ViewVC 1.1.23