Definitionen für die MySQL-Datenbank

Die Datenbanktabellen haben folgendes Schema:

MySQL-Datenbankdefinitionen
-- phpMyAdmin SQL Dump
-- version 2.6.3-pl1
-- https://www.phpmyadmin.net
-- 
-- Host: localhost
-- Erstellungszeit: 08. März 2007 um 19:44
-- Server Version: 4.1.13
-- PHP-Version: 4.4.0
 
SET AUTOCOMMIT=0;
START TRANSACTION;
 
-- 
-- Datenbank: `wetter`
-- 
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `lastids`
-- 
 
CREATE TABLE `lastids` (
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `id_PS` INT(10) UNSIGNED DEFAULT NULL,
  `id_RS` INT(10) UNSIGNED DEFAULT NULL,
  `id_THS` INT(10) UNSIGNED DEFAULT NULL,
  `id_WS` INT(10) UNSIGNED DEFAULT NULL,
  `id_LS` INT(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `light`
-- 
 
CREATE TABLE `light` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `sensid` tinyint(3) UNSIGNED DEFAULT NULL,
  `sunshine` tinyint(4) DEFAULT NULL,
  `sundur` SMALLINT(5) UNSIGNED DEFAULT NULL,
  `lux` SMALLINT(5) UNSIGNED DEFAULT NULL,
  `factor` SMALLINT(5) UNSIGNED DEFAULT NULL,
  `ok` CHAR(1) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `dataindex` (`stationid`,`sensid`,`datetime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `pressure`
-- 
 
CREATE TABLE `pressure` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `sensid` tinyint(3) UNSIGNED DEFAULT NULL,
  `P` SMALLINT(4) DEFAULT NULL,
  `ok` CHAR(1) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `dataindex` (`stationid`,`sensid`,`datetime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `rain`
-- 
 
CREATE TABLE `rain` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `sensid` tinyint(3) UNSIGNED DEFAULT NULL,
  `counter` SMALLINT(4) UNSIGNED DEFAULT NULL,
  `diff` INT(10) UNSIGNED DEFAULT NULL,
  `ok` CHAR(1) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `dataindex` (`stationid`,`sensid`,`datetime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `sensor_descr`
-- 
 
CREATE TABLE `sensor_descr` (
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `sensid` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `type` enum('th','wind','rain','light','pressure') NOT NULL DEFAULT 'th',
  `name` VARCHAR(80) DEFAULT NULL,
  KEY `sensid` (`sensid`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `station_descr`
-- 
 
CREATE TABLE `station_descr` (
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `name` VARCHAR(80) DEFAULT NULL,
  `descr` VARCHAR(80) DEFAULT NULL,
  `manufacturer` VARCHAR(80) DEFAULT NULL,
  `model` VARCHAR(80) DEFAULT NULL,
  `location` VARCHAR(80) DEFAULT NULL,
  `rainbycount` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
  `altitude` SMALLINT(6) DEFAULT '-1',
  KEY `stationid` (`stationid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `th_sensors`
-- 
 
CREATE TABLE `th_sensors` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `sensid` tinyint(3) UNSIGNED DEFAULT NULL,
  `T` FLOAT(5,1) DEFAULT NULL,
  `H` tinyint(2) UNSIGNED DEFAULT NULL,
  `ok` CHAR(1) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `dataindex` (`stationid`,`sensid`,`datetime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-- --------------------------------------------------------
 
-- 
-- Tabellenstruktur für Tabelle `wind`
-- 
 
CREATE TABLE `wind` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `stationid` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `sensid` tinyint(3) UNSIGNED DEFAULT NULL,
  `speed` FLOAT(5,1) DEFAULT NULL,
  `angle` SMALLINT(3) UNSIGNED DEFAULT NULL,
  `range` FLOAT(4,1) DEFAULT NULL,
  `ok` CHAR(1) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `dataindex` (`stationid`,`sensid`,`datetime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
COMMIT;

Inhaltsverzeichnis der WS500 Beschreibung