-
Notifications
You must be signed in to change notification settings - Fork 0
/
database_ini.sql
335 lines (281 loc) · 18.5 KB
/
database_ini.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Hostiteľ: mysql
-- Čas generovania: Pi 14.Máj 2021, 16:10
-- Verzia serveru: 8.0.21
-- Verzia PHP: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 utf8mb4 */;
--
-- Databáza: `test`
--
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `Answers`
--
CREATE TABLE `Answers` (
`id` int NOT NULL,
`user_id` int NOT NULL,
`question_id` int NOT NULL,
`type` enum('Krátka odpoveď','Výber správnej odpovede','Párovanie odpovedí','Nakreslenie obrázka','Matematický výraz') CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
`answer` text CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
`correct_answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovak_ci;
--
-- Sťahujem dáta pre tabuľku `Answers`
--
INSERT INTO `Answers` (`id`, `user_id`, `question_id`, `type`, `answer`, `correct_answer`) VALUES
(1, 1, 1, 'Krátka odpoveď', '4096', '4096'),
(2, 1, 2, 'Krátka odpoveď', '69', '69'),
(3, 1, 3, 'Výber správnej odpovede', 'meter štvorcový,meter kubický,meter za sekundu', 'meter štvorcový'),
(4, 1, 4, 'Výber správnej odpovede', 'V,S,D', 'V'),
(5, 1, 5, 'Párovanie odpovedí', '6a*a', '6a*a'),
(6, 1, 6, 'Párovanie odpovedí', '2*(ab+ac+bc)', '2*(ab+ac+bc)'),
(7, 1, 7, 'Párovanie odpovedí', '2Sp + Q', '2Sp + Q'),
(8, 1, 8, 'Párovanie odpovedí', '2πr(r+v)', '2πr(r+v)'),
(9, 2, 12, 'Krátka odpoveď', '250', '250'),
(10, 2, 13, 'Krátka odpoveď', '100', '100'),
(11, 2, 14, 'Výber správnej odpovede', 'Euler,Ronaldo,Tatar', 'Euler'),
(12, 2, 15, 'Výber správnej odpovede', 'O,V,S', 'S'),
(13, 2, 16, 'Párovanie odpovedí', 'a*a*a', 'a*a*a'),
(14, 2, 17, 'Párovanie odpovedí', 'a*b*c', 'a*b*c'),
(15, 2, 18, 'Párovanie odpovedí', 'Sp*v', 'Sp*v'),
(16, 2, 19, 'Párovanie odpovedí', 'π.r*r.v', 'π.r*r.v'),
(17, 3, 1, 'Krátka odpoveď', '4096', NULL),
(18, 3, 2, 'Krátka odpoveď', '69', NULL),
(19, 3, 3, 'Výber správnej odpovede', '', 'meter štvorcový'),
(20, 3, 4, 'Výber správnej odpovede', '', 'V'),
(21, 3, 10, 'Matematický výraz', '4x\n2\n−14x+8', NULL),
(22, 3, 11, 'Matematický výraz', 'ln∣x∣', NULL),
(23, 3, 9, 'Nakreslenie obrázka', 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczp6d2liYmxlcj0iaHR0cDovL3p3aWJibGVyLmNvbS94bWwiIHZlcnNpb249IjEuMiIgYmFzZVByb2ZpbGU9InRpbnkiIHdpZHRoPSIxOTguNzM0NDI0NTkxMDY0NDUiIGhlaWdodD0iMjAyLjY5MDYxMjM3NTczNjI0IiB2aWV3Qm94PSIwIDAgMTk4LjczNDQyNDU5MTA2NDQ1IDIwMi42OTA2MTIzNzU3MzYyNCI+CiAgPHBhdGggZD0iTTU3My42MDAwMDYxMDM1MTU2LDE1MS4xOTk5OTY5NDgyNDIyIEw1NzMuMzQzNzU5ODk0MzcxLDE1Mi45NDg0MzYyNjAyMjM0IEw1NjYuMTg3NDg5NTA5NTgyNSwxNjMuODg3NDk0MDg3MjE5MjQgTDU1OS4yMTU2MzU3NzY1MTk4LDE3Ni43OTk5ODc3OTI5Njg3NSBMNTQ2LjI2ODc0NTg5OTIwMDQsMjA1LjYwMDAwMDg1ODMwNjg4IEw1MzguMTA5MzczNDUwMjc5MiwyMjAuMjAwMDA4NjkwMzU3MiBMNTM3LjI2ODc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NDAzOTMgTDQ4My44OTA1OTYxNTEzNTE5MywyMTQuNjU0NzExOTYxNzQ2MjIgTDQ3Ny42NTQ2OTI3NjkwNTA2LDIxNC42NTQ3MTE5NjE3NDYyMiBMNDc3Ljg1NDY4OTcxNzI5MjgsMjE1Ljk0NTMwMjI0ODAwMTEgTDQ4MC44MDAwMTgzMTA1NDY5LDIxNS45OTk5ODQ3NDEyMTA5NCIgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAtNDY0LjY2MjUwNTE0OTg0MTMgLTQzLjkwOTM3ODQ2ODk5MDMyNikiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmMDAwMCIgc3Ryb2tlLXdpZHRoPSIxMCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiB6d2liYmxlcjppZD0ia2x5dzg2Ii8+CiAgPHBhdGggZD0iTTQ3Ni44MDAwMTgzMTA1NDY5LDIwNy45OTk5ODQ3NDEyMTA5NCBMNDc3LjYwMDAwNjEwMzUxNTYsMjAwLjgwMDAwMzA1MTc1NzgiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTQ2NC42NjI1MDUxNDk4NDEzIC00My45MDkzNzg0Njg5OTAzMjYpIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDg4MDAiIHN0cm9rZS13aWR0aD0iMTAiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgendpYmJsZXI6aWQ9Im5mcGppbyIvPgo8L3N2Zz4K', NULL),
(24, 3, 6, 'Párovanie odpovedí', '2*(ab+ac+bc)', NULL),
(25, 3, 8, 'Párovanie odpovedí', '2πr(r+v)', NULL),
(26, 3, 5, 'Párovanie odpovedí', '6a*a', NULL),
(27, 3, 7, 'Párovanie odpovedí', '2Sp + Q', NULL);
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `Exams`
--
CREATE TABLE `Exams` (
`id` int NOT NULL,
`exam_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
`user_id` int DEFAULT NULL,
`title` varchar(32) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
`time_limit` varchar(128) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
`is_active` tinyint(1) DEFAULT NULL,
`exam_points` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovak_ci;
--
-- Sťahujem dáta pre tabuľku `Exams`
--
INSERT INTO `Exams` (`id`, `exam_code`, `user_id`, `title`, `time_limit`, `is_active`, `exam_points`) VALUES
(1, '171353', 1, 'Test z matematiky', '900000', 1, 30),
(2, '8f944a', 2, 'Previerka z matematiky', '900000', 0, 40);
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `ExamsLogin`
--
CREATE TABLE `ExamsLogin` (
`id` int NOT NULL,
`exam_id` int NOT NULL,
`user_id` int NOT NULL,
`finished` tinyint(1) NOT NULL,
`leave_tab` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Sťahujem dáta pre tabuľku `ExamsLogin`
--
INSERT INTO `ExamsLogin` (`id`, `exam_id`, `user_id`, `finished`, `leave_tab`) VALUES
(1, 1, 3, 1, 1);
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `Points`
--
CREATE TABLE `Points` (
`id` int NOT NULL,
`exam_id` int NOT NULL,
`student_id` int NOT NULL,
`question1_points` int NOT NULL,
`question2_points` int NOT NULL,
`question3_points` int NOT NULL,
`question4_points` int NOT NULL,
`question5_points` int NOT NULL,
`question6_points` int NOT NULL,
`question7_points` int NOT NULL,
`question8_points` int NOT NULL,
`question9_points` int NOT NULL,
`question10_points` int NOT NULL,
`question11_points` int NOT NULL,
`all_points` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Sťahujem dáta pre tabuľku `Points`
--
INSERT INTO `Points` (`id`, `exam_id`, `student_id`, `question1_points`, `question2_points`, `question3_points`, `question4_points`, `question5_points`, `question6_points`, `question7_points`, `question8_points`, `question9_points`, `question10_points`, `question11_points`, `all_points`) VALUES
(1, 1, 3, 2, 2, 3, 3, 4, 4, 4, 2, 2, 2, 2, 30);
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `Questions`
--
CREATE TABLE `Questions` (
`id` int NOT NULL,
`exam_id` int NOT NULL,
`question` varchar(256) CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
`answer_id` int NOT NULL,
`type` enum('Krátka odpoveď','Výber správnej odpovede','Párovanie odpovedí','Nakreslenie obrázka','Matematický výraz') CHARACTER SET utf8 COLLATE utf8_slovak_ci NOT NULL,
`question_points` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovak_ci;
--
-- Sťahujem dáta pre tabuľku `Questions`
--
INSERT INTO `Questions` (`id`, `exam_id`, `question`, `answer_id`, `type`, `question_points`) VALUES
(1, 1, 'Vypočítajte 8*8*8*8', 1, 'Krátka odpoveď', 2),
(2, 1, 'Vypočítajte (128/2)+25-(5*4)', 2, 'Krátka odpoveď', 2),
(3, 1, 'Rozloha sa meria v ?', 3, 'Výber správnej odpovede', 3),
(4, 1, 'Značka pre objem', 4, 'Výber správnej odpovede', 3),
(5, 1, 'Obsah kocky', 5, 'Párovanie odpovedí', 2),
(6, 1, 'Obsah kvádra', 6, 'Párovanie odpovedí', 2),
(7, 1, 'Obsah Hranolu', 7, 'Párovanie odpovedí', 2),
(8, 1, 'Obsah Valca', 8, 'Párovanie odpovedí', 2),
(9, 1, 'jablko nepáda ďaleko od stromu', 0, 'Nakreslenie obrázka', 4),
(10, 1, 'Derivuj y = 5x^3 -7x^2 + 8x -14', 0, 'Matematický výraz', 4),
(11, 1, 'Napíš vzorec pre Integrál 1/x', 0, 'Matematický výraz', 4),
(12, 2, '7*7*7 - 93', 9, 'Krátka odpoveď', 3),
(13, 2, '55/11 * 20', 10, 'Krátka odpoveď', 3),
(14, 2, 'Známy matematik', 11, 'Výber správnej odpovede', 4),
(15, 2, 'Značka pre Obsah', 12, 'Výber správnej odpovede', 4),
(16, 2, 'Objem kocky', 13, 'Párovanie odpovedí', 3),
(17, 2, 'Objem kvádra', 14, 'Párovanie odpovedí', 3),
(18, 2, 'Objem hranolu', 15, 'Párovanie odpovedí', 3),
(19, 2, 'Objem valca', 16, 'Párovanie odpovedí', 3),
(20, 2, 'ihlan', 0, 'Nakreslenie obrázka', 4),
(21, 2, 'Vzorec pre deriváciu sin x', 0, 'Matematický výraz', 5),
(22, 2, 'Vzorec pre integrál sin x', 0, 'Matematický výraz', 5);
-- --------------------------------------------------------
--
-- Štruktúra tabuľky pre tabuľku `Users`
--
CREATE TABLE `Users` (
`id` int NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
`surname` varchar(32) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
`ais_id` int DEFAULT NULL,
`email` varchar(64) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL,
`password` varchar(64) CHARACTER SET utf8 COLLATE utf8_slovak_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovak_ci;
--
-- Sťahujem dáta pre tabuľku `Users`
--
INSERT INTO `Users` (`id`, `name`, `surname`, `ais_id`, `email`, `password`) VALUES
(1, 'Ján', 'Nový', NULL, 'novy@gmail.com', 'b6fe850602bd67665c1cb19f6fc4e0ecf46c9e2e'),
(2, 'Peter', 'Hraško', NULL, 'hrasko@gmail.com', '4b8373d016f277527198385ba72fda0feb5da015'),
(3, 'Lukáš', 'Löbl', 97857, NULL, NULL);
--
-- Kľúče pre exportované tabuľky
--
--
-- Indexy pre tabuľku `Answers`
--
ALTER TABLE `Answers`
ADD PRIMARY KEY (`id`),
ADD KEY `umiestnenia_ifbk_1` (`question_id`),
ADD KEY `umiestnenia_ifbk_2` (`user_id`);
--
-- Indexy pre tabuľku `Exams`
--
ALTER TABLE `Exams`
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`);
--
-- Indexy pre tabuľku `ExamsLogin`
--
ALTER TABLE `ExamsLogin`
ADD PRIMARY KEY (`id`);
--
-- Indexy pre tabuľku `Points`
--
ALTER TABLE `Points`
ADD PRIMARY KEY (`id`),
ADD KEY `exam_id` (`exam_id`),
ADD KEY `student_id` (`student_id`);
--
-- Indexy pre tabuľku `Questions`
--
ALTER TABLE `Questions`
ADD PRIMARY KEY (`id`),
ADD KEY `exam_id` (`exam_id`,`answer_id`),
ADD KEY `answer_id` (`answer_id`);
--
-- Indexy pre tabuľku `Users`
--
ALTER TABLE `Users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT pre exportované tabuľky
--
--
-- AUTO_INCREMENT pre tabuľku `Answers`
--
ALTER TABLE `Answers`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
--
-- AUTO_INCREMENT pre tabuľku `Exams`
--
ALTER TABLE `Exams`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT pre tabuľku `ExamsLogin`
--
ALTER TABLE `ExamsLogin`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pre tabuľku `Points`
--
ALTER TABLE `Points`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pre tabuľku `Questions`
--
ALTER TABLE `Questions`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
--
-- AUTO_INCREMENT pre tabuľku `Users`
--
ALTER TABLE `Users`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- Obmedzenie pre exportované tabuľky
--
--
-- Obmedzenie pre tabuľku `Answers`
--
ALTER TABLE `Answers`
ADD CONSTRAINT `umiestnenia_ifbk_1` FOREIGN KEY (`question_id`) REFERENCES `Questions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `umiestnenia_ifbk_2` FOREIGN KEY (`user_id`) REFERENCES `Users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Obmedzenie pre tabuľku `Exams`
--
ALTER TABLE `Exams`
ADD CONSTRAINT `Exams_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `Users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Obmedzenie pre tabuľku `Points`
--
ALTER TABLE `Points`
ADD CONSTRAINT `points_ibfk_1` FOREIGN KEY (`exam_id`) REFERENCES `Exams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `points_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `Users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Obmedzenie pre tabuľku `Questions`
--
ALTER TABLE `Questions`
ADD CONSTRAINT `exam_ifbk_1` FOREIGN KEY (`exam_id`) REFERENCES `Exams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!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 */;