1
-- HelioViewer Database Structure --
2
-- last update: 06-25-2008 --
5
-- Create schema esahelio_svdb0
7
CREATE DATABASE IF NOT EXISTS esahelio_svdb0;
15
-- Table structure for table `image`
17
CREATE TABLE `esahelio_svdb0`.`image` (
18
`id` int(10) unsigned NOT NULL auto_increment,
19
`measurementId` int(10) unsigned NOT NULL default '0',
20
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
21
`filetype` varchar(4) default NULL,
23
) ENGINE=MyISAM AUTO_INCREMENT=9198 DEFAULT CHARSET=utf8;
26
-- Table structure for table `tile`
28
DROP TABLE IF EXISTS `tile`;
29
CREATE TABLE IF NOT EXISTS `tile` (
30
`imageId` int(11) NOT NULL default '0',
31
`x` int(11) NOT NULL default '0',
32
`y` int(11) NOT NULL default '0',
33
`zoom` int(11) NOT NULL default '0',
34
`url` varchar(255) default NULL,
36
PRIMARY KEY (`imageId`,`x`,`y`,`zoom`)
37
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
40
CREATE TABLE `detector` (
41
`id` int(10) unsigned NOT NULL auto_increment,
42
`abbreviation` varchar(4) NOT NULL default '',
43
`name` varchar(255) default NULL,
44
`instrumentId` int(10) unsigned NOT NULL default '0',
45
`imgSunRatio` float(6,3) default NULL,
46
`lowestRegularZoomLevel` tinyint(4) default NULL,
47
`opacityGroupId` int(10) unsigned NOT NULL default '1',
49
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
52
-- Dumping data for table `detector`
55
INSERT INTO `detector` VALUES(11, 'MDI', 'MDI', 8, NULL, NULL, 1);
56
INSERT INTO `detector` VALUES(12, '0C3', '0C3', 9, NULL, NULL, 3);
57
INSERT INTO `detector` VALUES(13, '0C2', '0C2', 9, NULL, NULL, 2);
58
INSERT INTO `detector` VALUES(14, 'EIT', 'EIT', 10, NULL, NULL, 1);
60
-- --------------------------------------------------------
63
-- Table structure for table `instrument`
66
CREATE TABLE `instrument` (
67
`id` int(10) unsigned NOT NULL auto_increment,
68
`abbreviation` varchar(4) NOT NULL default '',
69
`name` varchar(255) default NULL,
70
`observatoryId` int(10) unsigned NOT NULL default '0',
72
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
75
-- Dumping data for table `instrument`
78
INSERT INTO `instrument` VALUES(8, 'MDI', 'MDI', 3);
79
INSERT INTO `instrument` VALUES(9, 'LAS', 'LAS', 3);
80
INSERT INTO `instrument` VALUES(10, 'EIT', 'EIT', 3);
82
-- --------------------------------------------------------
85
-- Table structure for table `measurement`
88
CREATE TABLE `measurement` (
89
`id` int(10) unsigned NOT NULL auto_increment,
90
`measurementTypeId` int(10) unsigned NOT NULL default '0',
91
`detectorId` int(10) unsigned NOT NULL default '0',
92
`name` varchar(255) default NULL,
93
`abbreviation` varchar(4) NOT NULL default '',
95
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=25 ;
98
-- Dumping data for table `measurement`
101
INSERT INTO `measurement` VALUES(17, 0, 11, 'mag', 'mag');
102
INSERT INTO `measurement` VALUES(18, 0, 11, 'int', 'int');
103
INSERT INTO `measurement` VALUES(19, 0, 12, '0WL', '0WL');
104
INSERT INTO `measurement` VALUES(20, 0, 13, '0WL', '0WL');
105
INSERT INTO `measurement` VALUES(21, 1, 14, '195', '195');
106
INSERT INTO `measurement` VALUES(22, 1, 14, '171', '171');
107
INSERT INTO `measurement` VALUES(23, 1, 14, '304', '304');
108
INSERT INTO `measurement` VALUES(24, 1, 14, '284', '284');
110
-- --------------------------------------------------------
113
-- Table structure for table `measurementType`
116
CREATE TABLE `measurementType` (
117
`id` int(10) unsigned NOT NULL auto_increment,
118
`name` varchar(255) NOT NULL default '',
119
`unit` varchar(255) default NULL,
121
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
124
-- Dumping data for table `measurementType`
127
INSERT INTO `measurementType` VALUES(0, 'measurement', NULL);
128
INSERT INTO `measurementType` VALUES(1, 'wavelength', 'nm');
130
-- --------------------------------------------------------
133
-- Table structure for table `observatory`
136
CREATE TABLE `observatory` (
137
`id` int(10) unsigned NOT NULL auto_increment,
138
`abbreviation` varchar(4) NOT NULL default '',
139
`name` varchar(255) default NULL,
141
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
144
-- Dumping data for table `observatory`
147
INSERT INTO `observatory` VALUES(3, 'soho', 'soho');
149
-- --------------------------------------------------------
152
-- Table structure for table `opacityGroup`
155
CREATE TABLE `opacityGroup` (
156
`id` int(10) unsigned NOT NULL auto_increment,
157
`description` varchar(255) NOT NULL,
159
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
162
-- Dumping data for table `opacityGroup`
165
INSERT INTO `opacityGroup` VALUES(1, 'Full Disc Image');
166
INSERT INTO `opacityGroup` VALUES(2, 'Coronagraph Image, in the range of LASCO C2');
167
INSERT INTO `opacityGroup` VALUES(3, 'Coronagraph Image, in the range of LASCO C3');