forked from Colviz/Elective-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
electivemanager.sql
455 lines (381 loc) · 19.5 KB
/
electivemanager.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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 27, 2018 at 06:40 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.0.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;
--
-- Database: `electivemanager`
--
DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `allotments` (IN `roll` VARCHAR(11)) SELECT name, cgpi from students WHERE rollno = roll$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `allot_final` (IN `roll` VARCHAR(11), IN `subject` VARCHAR(11)) MODIFIES SQL DATA
INSERT INTO students_allotted(rollno, subj_code) VALUES(roll, subject)$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `allot_priority` (IN `roll` VARCHAR(11)) READS SQL DATA
SELECT subj_code FROM priorities WHERE rollno = roll order by priority ASC limit 1$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `clear_priorities` () MODIFIES SQL DATA
TRUNCATE TABLE `priorities`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `clear_students_allotted` () NO SQL
TRUNCATE TABLE `students_allotted`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_specific_priority` (IN `roll` VARCHAR(11)) DELETE FROM priorities WHERE rollno = roll ORDER BY priority ASC LIMIT 1$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_user_priorities` (IN `roll` VARCHAR(11)) MODIFIES SQL DATA
DELETE FROM priorities WHERE rollno = roll$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `max_cgpi` () READS SQL DATA
SELECT rollno from students WHERE cgpi = (
select max(cgpi)
from students WHERE allotment = 0 LIMIT 1
)$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `max_cgpi_priorities` () READS SQL DATA
SELECT rollno from priorities WHERE cgpi = (
select max(cgpi)
from priorities
)$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `replicate_priorities_table` () INSERT INTO priorities_backup
SELECT * FROM priorities$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `resave_priorities` () MODIFIES SQL DATA
INSERT INTO `electivemanager`.`priorities`(`rollno`, `cgpi`, `subj_code`, `priority`) SELECT `rollno`, `cgpi`, `subj_code`, `priority` FROM `electivemanager`.`priorities_backup`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `seats_in_subject_allotted` (IN `subjcode` VARCHAR(11)) READS SQL DATA
SELECT COUNT(subj_code) AS total_seats FROM students_allotted WHERE subj_code = subjcode$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `select_priority` (IN `roll` VARCHAR(11)) READS SQL DATA
SELECT subj_code from priorities WHERE rollno = roll AND priority = (
select min(priority)
from priorities WHERE rollno = roll
)$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `student_alloted` (IN `roll` INT(11)) NO SQL
UPDATE students SET allotment = 1 WHERE rollno = roll$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `total_seats_subject` (IN `subjcode` VARCHAR(11)) READS SQL DATA
SELECT total_seats FROM subjects_published WHERE subj_code = subjcode AND active = 1$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `total_students_count` () READS SQL DATA
SELECT COUNT(rollno) AS countno FROM `priorities`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `total_students_rollno` () READS SQL DATA
SELECT rollno FROM `priorities` GROUP BY rollno$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `undo_allotment` () MODIFIES SQL DATA
UPDATE `students` SET `allotment` = '0' WHERE 1$$
DELIMITER ;
-- --------------------------------------------------------
--
-- Table structure for table `notifications`
--
CREATE TABLE `notifications` (
`id` int(10) NOT NULL,
`origin` varchar(15) DEFAULT NULL,
`username` varchar(15) DEFAULT NULL,
`destination` varchar(15) NOT NULL,
`type` varchar(15) NOT NULL,
`content` varchar(15) NOT NULL,
`marked` decimal(2,1) NOT NULL DEFAULT '0.0',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `notifications`
--
INSERT INTO `notifications` (`id`, `origin`, `username`, `destination`, `type`, `content`, `marked`, `created`) VALUES
(1, NULL, NULL, 'admin', 'login', '172.16.21.69', '1.0', '2017-07-27 07:08:51'),
(2, NULL, NULL, 'admin', 'login', '172.16.21.55', '1.0', '2017-07-27 07:08:51'),
(3, 'csed', 'deptsuper', 'deptuser', 'elec_delete', 'CS-700', '1.0', '2017-07-27 06:36:23'),
(4, 'csed', NULL, '14508', 'allotment', 'CS-700', '1.0', '2017-07-27 06:36:23'),
(5, NULL, '14555', 'admin', 'acc_delete', '172.16.21.69', '1.0', '2017-07-27 06:36:23'),
(6, 'csed', 'deptsuper', 'admin', 'elec_published', 'CS702', '0.5', '2017-07-27 07:08:51'),
(7, NULL, NULL, 'admin', 'pass_change', '172.16.21.69', '1.0', '2017-07-27 07:08:51'),
(8, NULL, NULL, 'admin', 'pass_change', '172.16.21.55', '1.0', '2017-07-27 07:08:51'),
(9, NULL, NULL, 'admin', 'pass_change', '172.16.21.69', '1.0', '2017-07-27 07:08:51'),
(10, NULL, NULL, 'admin', 'login', '172.16.21.69', '1.0', '2017-07-27 07:27:48'),
(11, NULL, NULL, 'student', 'fill_priorities', '07:00 PM 31/07', '0.0', '2017-07-30 07:24:48'),
(12, NULL, NULL, 'department', 'pub_elective', '05:00PM 01/08', '0.0', '2017-08-01 07:09:06'),
(13, 'csed', 'deptsuper', 'admin', 'elec_delete', 'cs-703', '0.5', '2017-08-01 07:31:53'),
(14, 'csed', 'deptsuper', 'deptuser', 'elec_delete', 'CS-702', '1.0', '2017-09-26 18:45:46');
-- --------------------------------------------------------
--
-- Table structure for table `priorities`
--
CREATE TABLE `priorities` (
`rollno` varchar(11) NOT NULL,
`cgpi` decimal(10,2) NOT NULL,
`subj_code` varchar(11) NOT NULL,
`priority` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `priorities`
--
INSERT INTO `priorities` (`rollno`, `cgpi`, `subj_code`, `priority`) VALUES
('14508', '10.00', 'CSE-414(c)', 0),
('14508', '10.00', 'CSE-425(c)', 1),
('14510', '9.00', 'CSE-414(c)', 0),
('14510', '9.00', 'CSE-425(c)', 1),
('14511', '8.00', 'CSE-414(c)', 0),
('14511', '8.00', 'CSE-425(c)', 1),
('iiitu14101', '7.00', 'CSE-414(c)', 0),
('iiitu14101', '7.00', 'CSE-425(c)', 1);
-- --------------------------------------------------------
--
-- Table structure for table `priorities_backup`
--
CREATE TABLE `priorities_backup` (
`rollno` varchar(11) NOT NULL,
`cgpi` decimal(10,2) NOT NULL,
`subj_code` varchar(11) NOT NULL,
`priority` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `students`
--
CREATE TABLE `students` (
`rollno` varchar(11) NOT NULL,
`name` varchar(20) NOT NULL,
`password` varchar(32) NOT NULL,
`branch` varchar(4) NOT NULL,
`fathers_name` varchar(20) NOT NULL,
`dob` date NOT NULL,
`reg_no` varchar(7) NOT NULL,
`email` varchar(35) NOT NULL,
`mobile_no` varchar(10) NOT NULL,
`activate` varchar(32) NOT NULL,
`cgpi` decimal(10,2) NOT NULL DEFAULT '0.00',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`allotment` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `students`
--
INSERT INTO `students` (`rollno`, `name`, `password`, `branch`, `fathers_name`, `dob`, `reg_no`, `email`, `mobile_no`, `activate`, `cgpi`, `created`, `allotment`) VALUES
('14508', 'john woods', '5f4dcc3b5aa765d61d8327deb882cf99', 'csed', 'H.S.Chaudhary', '1996-02-04', 'CSED221', '[email protected]', '9805126955', '1', '10.00', '2018-06-27 06:38:57', 0),
('14510', 'Pasha Kumar', '5f4dcc3b5aa765d61d8327deb882cf99', 'csed', 'bihari lal', '1998-10-15', 'asdf', '[email protected]', '7845125896', '1', '9.00', '2018-06-27 06:38:57', 0),
('14511', 'Kartikay', '5f4dcc3b5aa765d61d8327deb882cf99', 'csed', 'kartik', '1996-05-02', 'asdfas', '[email protected]', '8745965123', '1', '8.00', '2018-06-27 06:38:57', 0),
('iiitu14101', 'anyone here', '5f4dcc3b5aa765d61d8327deb882cf99', 'csed', 'fasdtqadf', '1996-12-02', 'asdfasd', '[email protected]', '9034257814', '1', '7.00', '2018-06-27 06:38:57', 0);
-- --------------------------------------------------------
--
-- Table structure for table `students_allotted`
--
CREATE TABLE `students_allotted` (
`rollno` varchar(11) NOT NULL,
`subj_code` varchar(11) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `subjects_published`
--
CREATE TABLE `subjects_published` (
`username` varchar(15) NOT NULL,
`deptcode` varchar(4) NOT NULL,
`subj_code` varchar(11) NOT NULL,
`subject_name` varchar(60) NOT NULL,
`total_seats` int(3) NOT NULL,
`link` varchar(100) NOT NULL,
`info` varchar(100) NOT NULL,
`subj_type` varchar(13) NOT NULL,
`semester` int(2) NOT NULL,
`active` int(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `subjects_published`
--
INSERT INTO `subjects_published` (`username`, `deptcode`, `subj_code`, `subject_name`, `total_seats`, `link`, `info`, `subj_type`, `semester`, `active`) VALUES
('deptsuper', 'csed', 'CS-700', 'Artificial Intelligence', 50, 'asdf', 'AI', 'pg_elective', 7, 0),
('deptsuper', 'csed', 'CS-701', 'Formal Languages and Automata Theory', 56, 'dfa', 'formal lang and automata', 'pg_elective', 5, 1),
('deptsuper', 'csed', 'CS-703', 'Topics in Cloud Computing', 85, 'adf', 'asfdasdf', 'pg_elective', 8, 0),
('deptuser', 'csed', 'CS-705', 'CAD of Digital Systems', 45, 'gfjhgjhgj', 'lkasjfklsadjfssfd', 'pg_elective', 8, 1),
('deptuser', 'csed', 'CS-708', 'Software Testing', 99, 'sdfg', 'asdfgsdfgsdfg', 'pg_elective', 5, 1),
('deptsuper', 'csed', 'CS-710', 'Real Time System Design', 52, 'jhjklhjklh', 'ksadjflkjdf lkasjdflkjasdf', 'pg_elective', 9, 1),
('deptsuper', 'csed', 'CS-712', 'Information Theory and Coding', 75, 'asdfjlkj', 'aslkdfjlkjsfd', 'pg_elective', 8, 1),
('deptsuper', 'csed', 'CS-716', 'Soft Computing', 85, 'kjkljklj', 'skldjfsdf', 'pg_elective', 1, 1),
('deptsuper', 'csed', 'CS-717', 'Cluster and Grid Computing', 45, 'asdklkjhgfdc', 'jhghjghjghj jhghjghjg', 'pg_elective', 9, 1),
('deptsuper', 'csed', 'CS-731', 'Multimedia Computing', 85, 'asdhfkjsdhf.pdf', 'kjdflkj adlkf lkjlkadsf jl sajdflkj lasjfkljsafd.', 'pg_elective', 8, 0),
('deptsuper', 'csed', 'CSE-413(c)', 'CAD of Digital Systems', 75, 'sadkfj', 'aslkdfjklasdjf', 'dept_elective', 8, 0),
('deptsuper', 'csed', 'CSE-414(c)', 'Parallel Algorithms', 2, '55', '554', 'dept_elective', 2, 1),
('deptsuper', 'csed', 'CSE-424(a)', 'Distributed Systems', 75, 'aslkdfj', 'KJDFkadjf', 'dept_elective', 7, 0),
('deptsuper', 'csed', 'CSE-424(c)', 'Reconfigurable Computing', 12, '5sdfghjkl', '4545', 'dept_elective', 6, 0),
('deptsuper', 'csed', 'CSE-425(c)', 'Programming Language Security', 2, 'dkfkjsd.pdf', 'asdklfjlk sldkjflkasjdfl;', 'dept_elective', 5, 1),
('deptsuper', 'csed', 'CSE-425(d)', 'Wireless Sensor Networks', 45, 'sdfjlkasjdflksjdfl', 'kdjfkdjfk kjkl', 'dept_elective', 3, 0),
('deptsuper', 'csed', 'CSO-316', 'Data Structure', 70, 'nith.ac.in/try.pdf', 'Hope it works.', 'open_elective', 5, 1),
('deptsuper', 'csed', 'CSO-324', 'Computer Graphics', 52, 'asfjljasdlf.pdf', 'asldkfjkl;asjfl;kjasl;fkjasl;kfjl;aksjfkl;jasf', 'open_elective', 6, 1);
-- --------------------------------------------------------
--
-- Table structure for table `subject_master`
--
CREATE TABLE `subject_master` (
`deptcode` varchar(4) NOT NULL,
`subj_code` varchar(11) NOT NULL,
`dept_elective` int(1) DEFAULT '0',
`open_elective` int(1) DEFAULT '0',
`pg_elective` int(1) DEFAULT '0',
`subject_name` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `subject_master`
--
INSERT INTO `subject_master` (`deptcode`, `subj_code`, `dept_elective`, `open_elective`, `pg_elective`, `subject_name`) VALUES
('csed', 'CS-700', 0, 0, 1, 'Artificial Intelligence'),
('csed', 'CS-701', 0, 0, 1, 'Formal Languages and Automata Theory'),
('csed', 'CS-702', 0, 0, 1, 'Computer Vision and Image Processing'),
('csed', 'CS-703', 0, 0, 1, 'Topics in Cloud Computing'),
('csed', 'CS-704', 0, 0, 1, 'Cryptography and Computer Security'),
('csed', 'CS-705', 0, 0, 1, 'CAD of Digital Systems'),
('csed', 'CS-706', 0, 0, 1, 'Combinatorial Optimization'),
('csed', 'CS-707', 0, 0, 1, 'Software Project & Quality Management'),
('csed', 'CS-708', 0, 0, 1, 'Software Testing'),
('csed', 'CS-709', 0, 0, 1, 'Graph Theory and Network Algorithms'),
('csed', 'CS-710', 0, 0, 1, 'Real Time System Design'),
('csed', 'CS-711', 0, 0, 1, 'Intrusion Detection System'),
('csed', 'CS-712', 0, 0, 1, 'Information Theory and Coding'),
('csed', 'CS-713', 0, 0, 1, 'Game Theory'),
('csed', 'CS-714', 0, 0, 1, 'Bioinformatics'),
('csed', 'CS-715', 0, 0, 1, 'Biometric Security'),
('csed', 'CS-716', 0, 0, 1, 'Soft Computing'),
('csed', 'CS-717', 0, 0, 1, 'Cluster and Grid Computing'),
('csed', 'CS-718', 0, 0, 1, 'Embedded Systems'),
('csed', 'CS-719', 0, 0, 1, 'Fault Tolerant Computing'),
('csed', 'CS-720', 0, 0, 1, 'Parallel Algorithms'),
('csed', 'CS-721', 0, 0, 1, 'Performance Evaluation of Computer System'),
('csed', 'CS-722', 0, 0, 1, 'Speech and NLP'),
('csed', 'CS-723', 0, 0, 1, 'Advances in Compiler Construction'),
('csed', 'CS-724', 0, 0, 1, 'Formal Methods in Secure Computing'),
('csed', 'CS-730', 0, 0, 1, 'Mobile Databases'),
('csed', 'CS-731', 0, 0, 1, 'Multimedia Computing'),
('csed', 'CS-732', 0, 0, 1, 'Data Mining'),
('csed', 'CS-733', 0, 0, 1, 'Security in Wireless & Mobile System'),
('csed', 'CS-734', 0, 0, 1, 'Distributed and Mobile Architecture'),
('csed', 'CS-735', 0, 0, 1, 'Programming Mobile Devices'),
('csed', 'CS-750', 0, 1, 0, 'Modeling & Simulation'),
('csed', 'CS-751', 0, 1, 0, 'Computer Graphics'),
('csed', 'CSE-413(a)', 1, 0, 0, 'Web Technologies'),
('csed', 'CSE-413(b)', 1, 0, 0, 'Information Retrieval'),
('csed', 'CSE-413(c)', 1, 0, 0, 'CAD of Digital Systems'),
('csed', 'CSE-413(d)', 1, 0, 0, 'Artificial Intelligence'),
('csed', 'CSE-414(a)', 1, 0, 0, 'Management Information System'),
('csed', 'CSE-414(b)', 1, 0, 0, 'Advanced Microprocessors'),
('csed', 'CSE-414(c)', 1, 0, 0, 'Parallel Algorithms'),
('csed', 'CSE-414(d)', 1, 0, 0, 'Soft Computing'),
('csed', 'CSE-424(a)', 1, 0, 0, 'Distributed Systems'),
('csed', 'CSE-424(b)', 1, 0, 0, 'Agent Based Systems'),
('csed', 'CSE-424(c)', 1, 0, 0, 'Reconfigurable Computing'),
('csed', 'CSE-424(d)', 1, 0, 0, 'Mobile Databases'),
('csed', 'CSE-425(a)', 1, 0, 0, 'Advance Computer Networks'),
('csed', 'CSE-425(b)', 1, 0, 0, 'Embedded Systems'),
('csed', 'CSE-425(c)', 1, 0, 0, 'Programming Language Security'),
('csed', 'CSE-425(d)', 1, 0, 0, 'Wireless Sensor Networks'),
('csed', 'CSO-316', 0, 1, 0, 'Data Structure'),
('csed', 'CSO-324', 0, 1, 0, 'Computer Graphics');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`username` varchar(15) NOT NULL,
`password` varchar(32) NOT NULL,
`email` varchar(35) NOT NULL,
`mobileno` varchar(10) NOT NULL,
`usertype` varchar(10) NOT NULL,
`active` varchar(32) DEFAULT NULL,
`deptcode` varchar(4) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`username`, `password`, `email`, `mobileno`, `usertype`, `active`, `deptcode`, `created`) VALUES
('archsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9834728473', 'superuser', '1', 'arch', '2017-06-19 10:47:12'),
('chedsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9805125833', 'superuser', '1', 'ched', '2017-06-19 09:00:11'),
('cheduser', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9805128544', 'normaluser', '1', 'ched', '2017-06-19 09:00:16'),
('civisuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9805123454', 'superuser', '1', 'civi', '2017-06-19 10:43:10'),
('deptsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9882955524', 'superuser', '1', 'csed', '2017-06-27 07:34:02'),
('deptuser', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '980512695', 'normaluser', '1', 'csed', '2017-06-17 11:54:40'),
('ecedsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9876543456', 'superuser', '1', 'eced', '2017-06-19 10:45:36'),
('eeedsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9823475837', 'superuser', '1', 'eeed', '2017-06-19 10:45:39'),
('medsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9805126944', 'superuser', '1', 'med', '2017-06-19 08:59:34'),
('meduser', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9805126433', 'normaluser', '1', 'med', '2017-06-19 08:59:39'),
('msedsuper', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9834237584', 'superuser', '1', 'msed', '2017-06-19 10:47:17'),
('Rishabh0402', '5f4dcc3b5aa765d61d8327deb882cf99', '[email protected]', '9805126955', 'admin', '1', 'adm', '2017-07-01 09:20:53');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `priorities`
--
ALTER TABLE `priorities`
ADD PRIMARY KEY (`rollno`,`priority`),
ADD KEY `subj code` (`subj_code`);
--
-- Indexes for table `priorities_backup`
--
ALTER TABLE `priorities_backup`
ADD PRIMARY KEY (`rollno`,`priority`),
ADD KEY `subj code` (`subj_code`);
--
-- Indexes for table `students`
--
ALTER TABLE `students`
ADD PRIMARY KEY (`rollno`),
ADD UNIQUE KEY `reg no` (`reg_no`),
ADD UNIQUE KEY `email` (`email`);
--
-- Indexes for table `students_allotted`
--
ALTER TABLE `students_allotted`
ADD KEY `rollno` (`rollno`),
ADD KEY `subj code` (`subj_code`);
--
-- Indexes for table `subjects_published`
--
ALTER TABLE `subjects_published`
ADD PRIMARY KEY (`subj_code`),
ADD KEY `username` (`username`);
--
-- Indexes for table `subject_master`
--
ALTER TABLE `subject_master`
ADD PRIMARY KEY (`subj_code`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`username`),
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `mobileno` (`mobileno`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `priorities`
--
ALTER TABLE `priorities`
ADD CONSTRAINT `priorities_ibfk_2` FOREIGN KEY (`rollno`) REFERENCES `students` (`rollno`) ON DELETE CASCADE;
--
-- Constraints for table `students_allotted`
--
ALTER TABLE `students_allotted`
ADD CONSTRAINT `students_allotted_ibfk_1` FOREIGN KEY (`rollno`) REFERENCES `students` (`rollno`),
ADD CONSTRAINT `students_allotted_ibfk_2` FOREIGN KEY (`subj_code`) REFERENCES `subjects_published` (`subj_code`);
--
-- Constraints for table `subjects_published`
--
ALTER TABLE `subjects_published`
ADD CONSTRAINT `subjects_published_ibfk_1` FOREIGN KEY (`username`) REFERENCES `users` (`username`);
/*!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 */;