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

Annotation of /YodaProfiler/docs/PAMELAProductionDB.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Sep 7 08:34:18 2006 UTC (18 years, 2 months ago) by mocchiut
Branch: MAIN
First release of the new profiler

1 mocchiut 1.1 DROP DATABASE IF EXISTS dbname;
2    
3     CREATE DATABASE dbname;
4    
5     USE dbname;
6    
7     CREATE TABLE `GL_RAW` (
8     `ID` int(10) unsigned NOT NULL auto_increment,
9     `PATH` varchar(255) NOT NULL default '',
10     `NAME` varchar(255) NOT NULL default '',
11     `BOOT_NUMBER` smallint(5) unsigned default NULL,
12     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
13     PRIMARY KEY (`ID`),
14     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
15     KEY `PATH_index` (`PATH`)
16     ) ENGINE=InnoDB;
17    
18     CREATE TABLE `GL_ROOT` (
19     `ID` int(10) unsigned NOT NULL auto_increment,
20     `ID_RAW` int(10) unsigned NOT NULL default '0',
21     `ID_TIMESYNC` int(10) unsigned NOT NULL default '0',
22     `PATH` varchar(255) NOT NULL default '',
23     `NAME` varchar(255) NOT NULL default '',
24     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
25     PRIMARY KEY (`ID`),
26     KEY `ID_RAW_index` (`ID_RAW`),
27     KEY `PATH_index` (`PATH`),
28     CONSTRAINT `ROOT_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE
29     ) ENGINE=InnoDB;
30    
31     CREATE TABLE `GL_RESURS_OFFSET` (
32     `ID` int(10) unsigned NOT NULL auto_increment,
33     `FROM_ID_RAW` int(10) unsigned NOT NULL default '0',
34     `TO_ID_RAW` int(10) unsigned NOT NULL default '0',
35     `OFFSET_DATE` timestamp default '0000-00-00 00:00:00',
36     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
37     PRIMARY KEY (`ID`)
38     ) ENGINE=InnoDB;
39    
40     INSERT INTO GL_RESURS_OFFSET VALUES(0,'1','4294967295','2006-06-14 21:00:00',NULL);
41    
42     CREATE TABLE `GL_TIMESYNC` (
43     `ID` int(10) unsigned NOT NULL auto_increment,
44     `ID_RAW` int(10) unsigned NOT NULL default '0',
45     `OBT0` int(10) unsigned NOT NULL default '0',
46     `TIMESYNC` int(10) unsigned NOT NULL default '0',
47     `TYPE` smallint(5) unsigned NOT NULL default '0',
48     PRIMARY KEY (`ID`),
49     KEY `ID_RAW_index` (`ID_RAW`),
50     KEY `TYPE_index` (`TYPE`),
51     CONSTRAINT `TIME_RAW_fk` FOREIGN KEY (`ID_RAW`) REFERENCES `GL_RAW` (`ID`) ON DELETE CASCADE
52     ) ENGINE=InnoDB;
53    
54     CREATE TABLE `GL_PARAM` (
55     `ID` int(10) unsigned NOT NULL auto_increment,
56     `PATH` varchar(255) NOT NULL default '',
57     `NAME` varchar(255) NOT NULL default '',
58     `FROM_TIME` int(10) unsigned NOT NULL default '0',
59     `TO_TIME` int(10) unsigned NOT NULL default '0',
60     `TYPE` smallint(5) unsigned NOT NULL default '',
61     `DESCR` varchar(255) NOT NULL default '',
62     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
63     PRIMARY KEY (`ID`),
64     KEY `PATH_index` (`PATH`),
65     KEY `NAME_index` (`NAME`),
66     KEY `TYPE_index` (`TYPE`),
67     KEY `DESCR_index` (`DESCR`)
68     ) ENGINE=InnoDB;
69    
70     CREATE TABLE `GL_TLE` (
71     `ID` int(10) NOT NULL auto_increment,
72     `TLE1` varchar(255) NOT NULL default '',
73     `TLE2` varchar(255) NOT NULL default '',
74     `TLE3` 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     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
78     `NOTE` varchar(255) NOT NULL default '',
79     PRIMARY KEY (`ID`)
80     ) ENGINE=InnoDB;
81    
82     CREATE TABLE `GL_RUN` (
83     `ID` int(10) unsigned NOT NULL auto_increment,
84     `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
85     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
86     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
87     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
88     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
89     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
90     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
91     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
92     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
93     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
94     `EV_FROM` int(10) unsigned NOT NULL default '0',
95     `EV_TO` int(10) unsigned NOT NULL default '0',
96     `NEVENTS` int(10) unsigned NOT NULL default '0',
97     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
98     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
99     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
100     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
101     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
102     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
103     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
104     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
105     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
106     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
107     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
108     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
109     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
110     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
111     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
112     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
113     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
114     PRIMARY KEY (`ID`),
115     KEY `ID_RUN_FRAG_index` (`ID_RUN_FRAG`),
116     KEY `ID_ROOT_L0_index` (`ID_ROOT_L0`),
117     KEY `ID_ROOT_L2_index` (`ID_ROOT_L2`),
118     KEY `COMPILATIONTS_index` (`COMPILATIONTIMESTAMP`),
119     KEY `VALID_index` (`VALIDATION`),
120     KEY `TRKCALIB_index` (`TRK_CALIB_USED`),
121     KEY `CALDSPMASK_index` (`CAL_DSP_MASK`),
122     KEY `EFF_WS_index` (`EFF_WRK_SCHEDULE`),
123     KEY `FAV_WS_index` (`FAV_WRK_SCHEDULE`),
124     KEY `RM_ACQ_AFTER_CALIB_index` (`RM_ACQ_AFTER_CALIB`),
125     KEY `RM_ACQ_SETTING_MODE_index` (`RM_ACQ_SETTING_MODE`),
126     KEY `ACQ_VAR_INFO_index` (`ACQ_VAR_INFO`),
127     KEY `TRG_MODE_A_index` (`PRH_VAR_TRG_MODE_A`),
128     KEY `TRG_MODE_B_index` (`PRH_VAR_TRG_MODE_B`),
129     KEY `NEVENTS_index` (`NEVENTS`),
130     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
131     KEY `ID_RUN_fk_constraint` (`ID_ROOT_L0`),
132     KEY `ID_RUN_L2_fk_constraint` (`ID_ROOT_L2`),
133     CONSTRAINT `ID_RUN_fk_constraint` FOREIGN KEY (`ID_ROOT_L0`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE
134     ) ENGINE=InnoDB;
135    
136     CREATE TABLE `GL_RUN_FRAGMENTS` (
137     `ID` int(10) unsigned NOT NULL auto_increment,
138     `ID_RUN_FRAG` int(10) unsigned NOT NULL default '0',
139     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
140     `ID_ROOT_L2` int(10) unsigned NOT NULL default '0',
141     `RUNHEADER_TIME` int(10) unsigned NOT NULL default '0',
142     `RUNTRAILER_TIME` int(10) unsigned NOT NULL default '0',
143     `RUNHEADER_OBT` int(10) unsigned NOT NULL default '0',
144     `RUNTRAILER_OBT` int(10) unsigned NOT NULL default '0',
145     `RUNHEADER_PKT` int(10) unsigned NOT NULL default '0',
146     `RUNTRAILER_PKT` int(10) unsigned NOT NULL default '0',
147     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
148     `EV_FROM` int(10) unsigned NOT NULL default '0',
149     `EV_TO` int(10) unsigned NOT NULL default '0',
150     `NEVENTS` int(10) unsigned NOT NULL default '0',
151     `PKT_COUNTER` int(10) unsigned NOT NULL default '0',
152     `PKT_READY_COUNTER` int(10) unsigned NOT NULL default '0',
153     `COMPILATIONTIMESTAMP` int(10) unsigned NOT NULL default '0',
154     `FAV_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
155     `EFF_WRK_SCHEDULE` tinyint(3) unsigned NOT NULL default '0',
156     `PRH_VAR_TRG_MODE_A` int(10) unsigned NOT NULL default '0',
157     `PRH_VAR_TRG_MODE_B` int(10) unsigned NOT NULL default '0',
158     `ACQ_BUILD_INFO` int(10) unsigned NOT NULL default '0',
159     `ACQ_VAR_INFO` smallint(5) unsigned NOT NULL default '0',
160     `RM_ACQ_AFTER_CALIB` tinyint(3) NOT NULL default '0',
161     `RM_ACQ_SETTING_MODE` tinyint(3) NOT NULL default '0',
162     `TRK_CALIB_USED` int(10) unsigned NOT NULL default '0',
163     `CAL_DSP_MASK` tinyint(3) unsigned NOT NULL default '0',
164     `LAST_TIMESYNC` int(10) unsigned NOT NULL default '0',
165     `OBT_TIMESYNC` int(10) unsigned NOT NULL default '0',
166     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
167     `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
168     PRIMARY KEY (`ID`),
169     KEY `ID_RUN_FRAG_index` (`ID_RUN_FRAG`),
170     KEY `ID_ROOT_L0_index` (`ID_ROOT_L0`),
171     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
172     KEY `TRKCALIB_index` (`TRK_CALIB_USED`),
173     KEY `NID_RUN_fk_constraint` (`ID_ROOT_L0`),
174     CONSTRAINT `NID_RUN_fk_constraint` FOREIGN KEY (`ID_ROOT_L0`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE
175     ) ENGINE=InnoDB;
176    
177     CREATE TABLE `GL_CALO_CALIB` (
178     `ID` int(10) unsigned NOT NULL auto_increment,
179     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
180     `EV_ROOT` int(10) unsigned NOT NULL default '0',
181     `FROM_TIME` int(10) unsigned NOT NULL default '0',
182     `TO_TIME` int(10) unsigned NOT NULL default '0',
183     `SECTION` tinyint(3) unsigned NOT NULL default '0',
184     `OBT` int(10) unsigned NOT NULL default '0',
185     `PKT` int(10) unsigned NOT NULL default '0',
186     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
187     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
188     PRIMARY KEY (`ID`),
189     KEY `SECTION_index` (`SECTION`),
190     KEY `EV_ROOT_index` (`EV_ROOT`),
191     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
192     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
193     KEY `VALID1_index` (`VALIDATION`),
194     CONSTRAINT `CALO_REG_fk` FOREIGN KEY (`ID_ROOT_L0`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE
195     ) ENGINE=InnoDB;
196    
197     CREATE TABLE `GL_TRK_CALIB` (
198     `ID` int(10) unsigned NOT NULL auto_increment,
199     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
200     `EV_ROOT_CALIBTRK1` int(10) unsigned default NULL,
201     `EV_ROOT_CALIBTRK2` int(10) unsigned default NULL,
202     `FROM_TIME` int(10) unsigned NOT NULL default '0',
203     `TO_TIME` int(10) unsigned NOT NULL default '0',
204     `OBT1` int(10) unsigned NOT NULL default '0',
205     `PKT1` int(10) unsigned NOT NULL default '0',
206     `OBT2` int(10) unsigned NOT NULL default '0',
207     `PKT2` int(10) unsigned NOT NULL default '0',
208     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
209     `VALIDATION` tinyint(3) unsigned NOT NULL default '0',
210     PRIMARY KEY (`ID`),
211     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
212     KEY `EV_ROOT_CALIBTRK1index` (`EV_ROOT_CALIBTRK1`),
213     KEY `EV_ROOT_CALIBTRK2index` (`EV_ROOT_CALIBTRK2`),
214     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
215     KEY `VALID2_index` (`VALIDATION`),
216     CONSTRAINT `TRK_REG_fk` FOREIGN KEY (`ID_ROOT_L0`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE
217     ) ENGINE=InnoDB;
218    
219     CREATE TABLE `GL_S4_CALIB` (
220     `ID` int(10) unsigned NOT NULL auto_increment,
221     `ID_ROOT_L0` int(10) unsigned NOT NULL default '0',
222     `EV_ROOT` int(10) unsigned NOT NULL default '0',
223     `FROM_TIME` int(10) unsigned NOT NULL default '0',
224     `TO_TIME` int(10) unsigned NOT NULL default '0',
225     `OBT` int(10) unsigned NOT NULL default '0',
226     `PKT` int(10) unsigned NOT NULL default '0',
227     `BOOT_NUMBER` smallint(5) unsigned NOT NULL default '0',
228     PRIMARY KEY (`ID`),
229     KEY `ID_ROOT_index` (`ID_ROOT_L0`),
230     KEY `BOOTNUMBER_index` (`BOOT_NUMBER`),
231     CONSTRAINT `S4_REG_fk` FOREIGN KEY (`ID_ROOT_L0`) REFERENCES `GL_ROOT` (`ID`) ON DELETE CASCADE
232     ) ENGINE=InnoDB;
233    
234    

  ViewVC Help
Powered by ViewVC 1.1.23