+-- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686)
+--
+-- Host: estia Database: meteo
+-- ------------------------------------------------------
+-- Server version 5.5.35-0ubuntu0.13.10.2
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `sensor_types`
+--
+
+DROP TABLE IF EXISTS `sensor_types`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `sensor_types` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `st_name` varchar(32) CHARACTER SET utf8 NOT NULL,
+ `st_description` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `st_name` (`st_name`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `sensor_values`
+--
+
+DROP TABLE IF EXISTS `sensor_values`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `sensor_values` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `sensor_id` int(11) NOT NULL,
+ `timestamp` datetime NOT NULL,
+ `value` float NOT NULL,
+ `parameter_id` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `fk_sensor_values_sens_idx` (`sensor_id`),
+ KEY `sensor_values_idx` (`sensor_id`,`timestamp`),
+ KEY `fk_sensor_values_param_idx` (`parameter_id`),
+ CONSTRAINT `fk_sensor_values_param` FOREIGN KEY (`parameter_id`) REFERENCES `st_parameters` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT `fk_sensor_values_sens` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=223855 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `sensors`
+--
+
+DROP TABLE IF EXISTS `sensors`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `sensors` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `st_id` int(11) NOT NULL,
+ `s_id` varchar(32) CHARACTER SET utf8 NOT NULL,
+ `s_description` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UNIQUE` (`st_id`,`s_id`),
+ KEY `fk_sensors_st_idx` (`st_id`),
+ CONSTRAINT `fk_sensors_st` FOREIGN KEY (`st_id`) REFERENCES `sensor_types` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `st_parameters`
+--
+
+DROP TABLE IF EXISTS `st_parameters`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `st_parameters` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `st_id` int(11) NOT NULL,
+ `st_name` varchar(32) CHARACTER SET utf8 NOT NULL,
+ `st_unit` int(11) NOT NULL,
+ `st_description` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
+ `st_dot_color` varchar(45) DEFAULT 'red',
+ `st_fill_color_top` varchar(45) DEFAULT 'red',
+ `st_fill_color_bottom` varchar(45) DEFAULT 'blue',
+ `st_line_color` varchar(45) DEFAULT 'navy',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`st_id`,`st_name`),
+ KEY `fk_st_parameters_st_idx` (`st_id`),
+ KEY `fk_st_parameters_units_idx` (`st_unit`),
+ CONSTRAINT `fk_st_parameters_st` FOREIGN KEY (`st_id`) REFERENCES `sensor_types` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
+ CONSTRAINT `fk_st_parameters_units` FOREIGN KEY (`st_unit`) REFERENCES `units` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `unit_conv`
+--
+
+DROP TABLE IF EXISTS `unit_conv`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `unit_conv` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `from_unit` int(11) NOT NULL,
+ `to_unit` int(11) NOT NULL,
+ `a` float NOT NULL,
+ `b` float NOT NULL,
+ `c` float NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `unit_groups`
+--
+
+DROP TABLE IF EXISTS `unit_groups`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `unit_groups` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(45) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `units`
+--
+
+DROP TABLE IF EXISTS `units`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `units` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(32) CHARACTER SET utf8 NOT NULL,
+ `name_short` varchar(8) CHARACTER SET utf8 NOT NULL,
+ `unit_group` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `fk_units_group_idx` (`unit_group`),
+ CONSTRAINT `fk_units_group` FOREIGN KEY (`unit_group`) REFERENCES `unit_groups` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2014-03-17 20:17:36