Jose R Ortiz Ubarri 1 год назад
Родитель
Сommit
a415f8b876
1 измененных файлов: 160 добавлений и 0 удалений
  1. 160
    0
      maldisoft.sql

+ 160
- 0
maldisoft.sql Просмотреть файл

@@ -0,0 +1,160 @@
1
+-- MySQL dump 10.14  Distrib 5.5.44-MariaDB, for Linux (x86_64)
2
+--
3
+-- Host: localhost    Database: maldisoft
4
+-- ------------------------------------------------------
5
+-- Server version	5.5.44-MariaDB
6
+
7
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10
+/*!40101 SET NAMES utf8 */;
11
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12
+/*!40103 SET TIME_ZONE='+00:00' */;
13
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
+
18
+--
19
+-- Table structure for table `EXPERIMENT`
20
+--
21
+
22
+DROP TABLE IF EXISTS `EXPERIMENT`;
23
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
24
+/*!40101 SET character_set_client = utf8 */;
25
+CREATE TABLE `EXPERIMENT` (
26
+  `eid` int(11) NOT NULL AUTO_INCREMENT,
27
+  `uid` int(11) NOT NULL,
28
+  `name` varchar(255) NOT NULL,
29
+  `description` text NOT NULL,
30
+  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
31
+  PRIMARY KEY (`eid`),
32
+  UNIQUE KEY `name` (`name`),
33
+  KEY `expuid` (`uid`),
34
+  CONSTRAINT `expuid` FOREIGN KEY (`uid`) REFERENCES `USER` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
35
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
36
+/*!40101 SET character_set_client = @saved_cs_client */;
37
+
38
+--
39
+-- Table structure for table `EXPERIMENT_PEAK`
40
+--
41
+
42
+DROP TABLE IF EXISTS `EXPERIMENT_PEAK`;
43
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
44
+/*!40101 SET character_set_client = utf8 */;
45
+CREATE TABLE `EXPERIMENT_PEAK` (
46
+  `ep_id` int(11) NOT NULL AUTO_INCREMENT,
47
+  `eid` int(11) NOT NULL,
48
+  `peak` float NOT NULL,
49
+  PRIMARY KEY (`ep_id`),
50
+  UNIQUE KEY `eid` (`eid`,`peak`),
51
+  CONSTRAINT `epeid` FOREIGN KEY (`eid`) REFERENCES `EXPERIMENT` (`eid`) ON DELETE CASCADE ON UPDATE CASCADE
52
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
53
+/*!40101 SET character_set_client = @saved_cs_client */;
54
+
55
+--
56
+-- Table structure for table `INTENSITY`
57
+--
58
+
59
+DROP TABLE IF EXISTS `INTENSITY`;
60
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
61
+/*!40101 SET character_set_client = utf8 */;
62
+CREATE TABLE `INTENSITY` (
63
+  `intensity_id` int(11) NOT NULL AUTO_INCREMENT,
64
+  `pid` int(11) NOT NULL,
65
+  `peak` float NOT NULL,
66
+  `intensity` float NOT NULL,
67
+  PRIMARY KEY (`intensity_id`),
68
+  KEY `intenpid` (`pid`),
69
+  CONSTRAINT `intenpid` FOREIGN KEY (`pid`) REFERENCES `PEAK` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE
70
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
71
+/*!40101 SET character_set_client = @saved_cs_client */;
72
+
73
+--
74
+-- Table structure for table `PEAK`
75
+--
76
+
77
+DROP TABLE IF EXISTS `PEAK`;
78
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
79
+/*!40101 SET character_set_client = utf8 */;
80
+CREATE TABLE `PEAK` (
81
+  `pid` int(11) NOT NULL AUTO_INCREMENT,
82
+  `sid` int(11) NOT NULL,
83
+  `peak` float NOT NULL,
84
+  PRIMARY KEY (`pid`),
85
+  KEY `peaksid` (`sid`),
86
+  CONSTRAINT `peaksid` FOREIGN KEY (`sid`) REFERENCES `SAMPLE` (`sid`) ON DELETE CASCADE ON UPDATE CASCADE
87
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
88
+/*!40101 SET character_set_client = @saved_cs_client */;
89
+
90
+--
91
+-- Table structure for table `SAMPLE`
92
+--
93
+
94
+DROP TABLE IF EXISTS `SAMPLE`;
95
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
96
+/*!40101 SET character_set_client = utf8 */;
97
+CREATE TABLE `SAMPLE` (
98
+  `sid` int(11) NOT NULL AUTO_INCREMENT,
99
+  `eid` int(11) NOT NULL,
100
+  `uuid` varchar(128) NOT NULL,
101
+  `name` varchar(255) NOT NULL,
102
+  `lastmodified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
103
+  PRIMARY KEY (`sid`),
104
+  UNIQUE KEY `uuid` (`uuid`),
105
+  KEY `sameid` (`eid`),
106
+  CONSTRAINT `sameid` FOREIGN KEY (`eid`) REFERENCES `EXPERIMENT` (`eid`) ON DELETE CASCADE ON UPDATE CASCADE
107
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
108
+/*!40101 SET character_set_client = @saved_cs_client */;
109
+
110
+--
111
+-- Table structure for table `USER`
112
+--
113
+
114
+DROP TABLE IF EXISTS `USER`;
115
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
116
+/*!40101 SET character_set_client = utf8 */;
117
+CREATE TABLE `USER` (
118
+  `uid` int(11) NOT NULL AUTO_INCREMENT,
119
+  `email` varchar(255) NOT NULL,
120
+  `passwd` varchar(128) NOT NULL,
121
+  `name` varchar(50) NOT NULL,
122
+  `last` varchar(50) NOT NULL,
123
+  `first` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
124
+  `lastaccess` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
125
+  PRIMARY KEY (`uid`),
126
+  UNIQUE KEY `email` (`email`),
127
+  UNIQUE KEY `email_2` (`email`),
128
+  UNIQUE KEY `email_3` (`email`)
129
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
130
+/*!40101 SET character_set_client = @saved_cs_client */;
131
+
132
+--
133
+-- Table structure for table `USER_EXPERIMENT`
134
+--
135
+
136
+DROP TABLE IF EXISTS `USER_EXPERIMENT`;
137
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
138
+/*!40101 SET character_set_client = utf8 */;
139
+CREATE TABLE `USER_EXPERIMENT` (
140
+  `ueid` int(11) NOT NULL AUTO_INCREMENT,
141
+  `uid` int(11) NOT NULL,
142
+  `eid` int(11) NOT NULL,
143
+  PRIMARY KEY (`ueid`),
144
+  UNIQUE KEY `uideid` (`uid`,`eid`) USING BTREE,
145
+  KEY `eueid` (`eid`),
146
+  CONSTRAINT `eueid` FOREIGN KEY (`eid`) REFERENCES `EXPERIMENT` (`eid`) ON DELETE CASCADE ON UPDATE CASCADE,
147
+  CONSTRAINT `uueid` FOREIGN KEY (`uid`) REFERENCES `USER` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
148
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
149
+/*!40101 SET character_set_client = @saved_cs_client */;
150
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
151
+
152
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
153
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
154
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
155
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
156
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
157
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
158
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
159
+
160
+-- Dump completed on 2015-11-10  8:48:01