-
Notifications
You must be signed in to change notification settings - Fork 0
/
sms_db.sql
456 lines (372 loc) · 13.6 KB
/
sms_db.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
456
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2024 at 07:33 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12
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 */;
--
-- Database: `sms_db`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`admin_id` int(11) NOT NULL,
`username` varchar(127) NOT NULL,
`password` varchar(255) NOT NULL,
`fname` varchar(127) NOT NULL,
`lname` varchar(127) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`admin_id`, `username`, `password`, `fname`, `lname`) VALUES
(1, 'pranto', '$2y$10$H7obJEdmLzqqcPy7wQWhsOLUvrgzC8f1Y1or2Gxaza5z1PT0tvLy6', 'pranto', 'kumar');
-- --------------------------------------------------------
--
-- Table structure for table `class`
--
CREATE TABLE `class` (
`class_id` int(11) NOT NULL,
`grade` int(11) NOT NULL,
`section` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `class`
--
INSERT INTO `class` (`class_id`, `grade`, `section`) VALUES
(1, 7, 2),
(2, 1, 1),
(3, 3, 3),
(4, 2, 1),
(7, 3, 1);
-- --------------------------------------------------------
--
-- Table structure for table `grades`
--
CREATE TABLE `grades` (
`grade_id` int(11) NOT NULL,
`grade` varchar(31) NOT NULL,
`grade_code` varchar(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `grades`
--
INSERT INTO `grades` (`grade_id`, `grade`, `grade_code`) VALUES
(1, '1', 'G'),
(2, '2', 'G'),
(3, '1', 'KG'),
(4, '2', 'KG'),
(7, '3', 'G');
-- --------------------------------------------------------
--
-- Table structure for table `message`
--
CREATE TABLE `message` (
`message_id` int(11) NOT NULL,
`sender_full_name` varchar(100) NOT NULL,
`sender_email` varchar(255) NOT NULL,
`message` text NOT NULL,
`date_time` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `message`
--
INSERT INTO `message` (`message_id`, `sender_full_name`, `sender_email`, `message`, `date_time`) VALUES
(1, 'John doe', '[email protected]', 'Hello, world', '2023-02-17 23:39:15'),
(2, 'John doe', '[email protected]', 'Hi', '2023-02-17 23:49:19'),
(3, 'John doe', '[email protected]', 'Hey, ', '2023-02-17 23:49:36');
-- --------------------------------------------------------
--
-- Table structure for table `registrar_office`
--
CREATE TABLE `registrar_office` (
`r_user_id` int(11) NOT NULL,
`username` varchar(127) NOT NULL,
`password` varchar(255) NOT NULL,
`fname` varchar(31) NOT NULL,
`lname` varchar(31) NOT NULL,
`address` varchar(31) NOT NULL,
`employee_number` int(11) NOT NULL,
`date_of_birth` date NOT NULL,
`phone_number` varchar(31) NOT NULL,
`qualification` varchar(31) NOT NULL,
`gender` varchar(7) NOT NULL,
`email_address` varchar(255) NOT NULL,
`date_of_joined` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `registrar_office`
--
INSERT INTO `registrar_office` (`r_user_id`, `username`, `password`, `fname`, `lname`, `address`, `employee_number`, `date_of_birth`, `phone_number`, `qualification`, `gender`, `email_address`, `date_of_joined`) VALUES
(1, 'pranto', '$2y$10$KgLltf09xKY338ZlQWZ3EemfedUXPtTQmEFQ/Qqf.HpXqS4Xx7hRO', 'James', 'William', 'West Virginia', 843583, '2022-10-04', '+12328324092', 'diploma', 'Male', '[email protected]', '2022-10-23 01:03:25'),
(2, 'oliver2', '$2y$10$7XhzOu.3OgHPFv7hKjvfUu3waU.8j6xTASj4yIWMfo...k/p8yvvS', 'Oliver2', 'Noah', 'California, Los angeles', 6546, '1999-06-11', '09457396789', 'BSc, BA', 'Male', '[email protected]', '2022-11-12 23:06:18');
-- --------------------------------------------------------
--
-- Table structure for table `section`
--
CREATE TABLE `section` (
`section_id` int(11) NOT NULL,
`section` varchar(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `section`
--
INSERT INTO `section` (`section_id`, `section`) VALUES
(1, 'A'),
(2, 'B'),
(3, 'C'),
(6, 'D'),
(7, 'E');
-- --------------------------------------------------------
--
-- Table structure for table `setting`
--
CREATE TABLE `setting` (
`id` int(11) NOT NULL,
`current_year` int(11) NOT NULL,
`current_semester` varchar(11) NOT NULL,
`school_name` varchar(100) NOT NULL,
`slogan` varchar(300) NOT NULL,
`about` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `setting`
--
INSERT INTO `setting` (`id`, `current_year`, `current_semester`, `school_name`, `slogan`, `about`) VALUES
(1, 2024, 'Spring\'2024', 'Sunbeams School', 'Build a better future', 'Welcome to Sunbeams School. Sunbeams is a private English medium co-educational school that is considered amongst the top five private schools in Bangladesh. ');
-- --------------------------------------------------------
--
-- Table structure for table `students`
--
CREATE TABLE `students` (
`student_id` int(11) NOT NULL,
`username` varchar(127) NOT NULL,
`password` varchar(255) NOT NULL,
`fname` varchar(127) NOT NULL,
`lname` varchar(255) NOT NULL,
`grade` int(11) NOT NULL,
`section` int(11) NOT NULL,
`address` varchar(31) NOT NULL,
`gender` varchar(7) NOT NULL,
`email_address` varchar(255) NOT NULL,
`date_of_birth` date NOT NULL,
`date_of_joined` timestamp NULL DEFAULT current_timestamp(),
`parent_fname` varchar(127) NOT NULL,
`parent_lname` varchar(127) NOT NULL,
`parent_phone_number` varchar(31) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `students`
--
INSERT INTO `students` (`student_id`, `username`, `password`, `fname`, `lname`, `grade`, `section`, `address`, `gender`, `email_address`, `date_of_birth`, `date_of_joined`, `parent_fname`, `parent_lname`, `parent_phone_number`) VALUES
(1, 'john', '$2y$10$.Qr6Rceb2quL1g9HO8YHdeXJZVWdYBPfdnClyoUQquOVNRRtDHzLC', 'John', 'Doe', 1, 1, 'California, Los angeles', 'Male', '[email protected]', '2012-09-12', '2019-12-11 14:16:44', 'Doe', 'Mark', '09393'),
(3, 'abas', '$2y$10$KLFheMWgpLfoiqMuW2LQxOPficlBiSIJ9.wE2qr5yJUbAQ.5VURoO', 'Abas', 'A.', 2, 1, 'Berlin', 'Male', '[email protected]', '2002-12-03', '2021-12-01 14:16:51', 'dsf', 'dfds', '7979'),
(4, 'jo', '$2y$10$pYyVlWg9jxkT0u/4LrCMS.ztMaOvgyol1hgNt.jqcFEqUC7yZLIYe', 'John3', 'Doe', 1, 1, 'California, Los angeles', 'Female', '[email protected]', '2013-06-13', '2022-09-10 13:48:49', 'Doe', 'Mark', '074932040'),
(5, 'jo2', '$2y$10$lRQ58lbak05rW7.be8ok4OaWJcb9znRp9ra.qXqnQku.iDrA9N8vy', 'Jhon', 'Doe', 1, 1, 'UK', 'Male', '[email protected]', '1990-02-15', '2023-02-12 18:11:26', 'Doe', 'Do', '0943568654'),
(6, 'rk', '$2y$10$qGDj9AG.ttnWYeOSIcv/5uoZqFa8KtpB.V5UwJ24VVyOssn51LX3u', 'rk', 'Saha', 3, 3, 'Dhaka', 'Male', '[email protected]', '1963-05-05', '2024-03-26 17:07:43', 'GK', 'AS', '01796754585'),
(7, 'as', '$2y$10$.ioXTfKAlzvQfpN1XLqrG.0pVzqovAFHd1oxf/tZ7W5QHlXP.B6xq', 'AH', 'DF', 7, 2, 'df', 'Male', '[email protected]', '2024-03-12', '2024-03-26 17:16:17', 'dfd', 'df', '32434'),
(8, 'AG', '$2y$10$yMuBn8aGM2mOZrW1wYCpUO.KvHMrYzOPSX.kxywazJHUB.AQHNDLm', 'KL', 'AS', 1, 1, 'we', 'Male', '[email protected]', '2024-03-06', '2024-03-26 17:18:20', 'as', 'dsf', '2345');
-- --------------------------------------------------------
--
-- Table structure for table `student_score`
--
CREATE TABLE `student_score` (
`id` int(11) NOT NULL,
`semester` varchar(100) NOT NULL,
`year` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`teacher_id` int(11) NOT NULL,
`subject_id` int(11) NOT NULL,
`results` varchar(512) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `student_score`
--
INSERT INTO `student_score` (`id`, `semester`, `year`, `student_id`, `teacher_id`, `subject_id`, `results`) VALUES
(4, 'Spring\'2024', 2024, 1, 1, 1, '78 100'),
(5, 'Spring\'2024', 2024, 1, 1, 3, '89 100'),
(6, 'Spring\'2024', 2024, 1, 1, 4, '96 100'),
(7, 'Spring\'2024', 2024, 1, 1, 5, '56 100');
-- --------------------------------------------------------
--
-- Table structure for table `subjects`
--
CREATE TABLE `subjects` (
`subject_id` int(11) NOT NULL,
`subject` varchar(31) NOT NULL,
`subject_code` varchar(31) NOT NULL,
`grade` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `subjects`
--
INSERT INTO `subjects` (`subject_id`, `subject`, `subject_code`, `grade`) VALUES
(1, 'English', 'Eng-101', 1),
(2, 'Physics', 'Phy-111', 2),
(3, 'Basic Biology', 'Bio-523', 1),
(4, 'Math', 'Math-205', 1),
(5, 'Chemistry', 'Chm-450', 3),
(6, 'Programming', 'Pro-383', 1),
(7, 'Java', 'Java-898', 1);
-- --------------------------------------------------------
--
-- Table structure for table `teachers`
--
CREATE TABLE `teachers` (
`teacher_id` int(11) NOT NULL,
`username` varchar(127) NOT NULL,
`password` varchar(255) NOT NULL,
`class` varchar(31) NOT NULL,
`fname` varchar(127) NOT NULL,
`lname` varchar(127) NOT NULL,
`subjects` varchar(31) NOT NULL,
`address` varchar(31) NOT NULL,
`employee_number` int(11) NOT NULL,
`date_of_birth` date DEFAULT NULL,
`phone_number` varchar(31) NOT NULL,
`qualification` varchar(127) NOT NULL,
`gender` varchar(7) NOT NULL,
`email_address` varchar(255) NOT NULL,
`date_of_joined` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `teachers`
--
INSERT INTO `teachers` (`teacher_id`, `username`, `password`, `class`, `fname`, `lname`, `subjects`, `address`, `employee_number`, `date_of_birth`, `phone_number`, `qualification`, `gender`, `email_address`, `date_of_joined`) VALUES
(1, 'pranto', '$2y$10$O/BAsK9pfMm/BlLY38OhsOlnS0mfDcHzOM6p5pCL3GKsXZ5l25Inq', '1234', 'Oliver', 'Noah', '12345', 'California, Los angeles', 6546, '2022-09-12', '0945739', 'BSc', 'Male', '[email protected]', '2022-09-09 05:23:45'),
(5, 'abas', '$2y$10$cMSKcHEJcg3K6wbVcxcXGuksgU39i70aEQVKN7ZHrzqTH9oAc3y5m', '134', 'Abas', 'A.', '7', 'Berlin', 1929, '2003-09-16', '09457396789', 'BSc,', 'Male', '[email protected]', '2022-09-09 06:42:31'),
(8, 'abdur', '$2y$10$q9ZWfFaqTEVfPUEPlIcyb.9drvsjGrlzP6Ifo5g0jfqmhoMt3R2Z6', '12347', 'Abdur', 'Rahman', '1267', 'uttara 10', 60, '1991-03-06', '01795745210', 'Bsc in cse', 'Male', '[email protected]', '2024-03-26 23:03:40');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`admin_id`),
ADD UNIQUE KEY `username` (`username`);
--
-- Indexes for table `class`
--
ALTER TABLE `class`
ADD PRIMARY KEY (`class_id`);
--
-- Indexes for table `grades`
--
ALTER TABLE `grades`
ADD PRIMARY KEY (`grade_id`);
--
-- Indexes for table `message`
--
ALTER TABLE `message`
ADD PRIMARY KEY (`message_id`);
--
-- Indexes for table `registrar_office`
--
ALTER TABLE `registrar_office`
ADD PRIMARY KEY (`r_user_id`);
--
-- Indexes for table `section`
--
ALTER TABLE `section`
ADD PRIMARY KEY (`section_id`);
--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `students`
--
ALTER TABLE `students`
ADD PRIMARY KEY (`student_id`),
ADD UNIQUE KEY `username` (`username`);
--
-- Indexes for table `student_score`
--
ALTER TABLE `student_score`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `subjects`
--
ALTER TABLE `subjects`
ADD PRIMARY KEY (`subject_id`);
--
-- Indexes for table `teachers`
--
ALTER TABLE `teachers`
ADD PRIMARY KEY (`teacher_id`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `class`
--
ALTER TABLE `class`
MODIFY `class_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `grades`
--
ALTER TABLE `grades`
MODIFY `grade_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `message`
--
ALTER TABLE `message`
MODIFY `message_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `registrar_office`
--
ALTER TABLE `registrar_office`
MODIFY `r_user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `section`
--
ALTER TABLE `section`
MODIFY `section_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `setting`
--
ALTER TABLE `setting`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
MODIFY `student_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `student_score`
--
ALTER TABLE `student_score`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `subjects`
--
ALTER TABLE `subjects`
MODIFY `subject_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `teachers`
--
ALTER TABLE `teachers`
MODIFY `teacher_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
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 */;