-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfdb_urp (1).sql
More file actions
443 lines (365 loc) · 14.7 KB
/
fdb_urp (1).sql
File metadata and controls
443 lines (365 loc) · 14.7 KB
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
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 24, 2023 at 01:02 AM
-- Server version: 8.0.32
-- PHP Version: 8.0.26
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: `fdb_urp`
--
-- --------------------------------------------------------
--
-- Table structure for table `assignment`
--
DROP TABLE IF EXISTS `assignment`;
CREATE TABLE IF NOT EXISTS `assignment` (
`Assignment ID` int NOT NULL AUTO_INCREMENT,
`Assignment Name` varchar(100) DEFAULT NULL,
`Assignment Description` varchar(100) DEFAULT NULL,
`Maximum Marks` int DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`Assignment ID`),
KEY `FK_student_assgn` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `attendance`
--
DROP TABLE IF EXISTS `attendance`;
CREATE TABLE IF NOT EXISTS `attendance` (
`Attendance ID` int NOT NULL AUTO_INCREMENT,
`Student ID` int DEFAULT NULL,
`Professor ID` int DEFAULT NULL,
PRIMARY KEY (`Attendance ID`),
KEY `FK_student_atten` (`Student ID`),
KEY `FK_prof_atten` (`Professor ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `class schedule`
--
DROP TABLE IF EXISTS `class schedule`;
CREATE TABLE IF NOT EXISTS `class schedule` (
`Class Schedule ID` int NOT NULL AUTO_INCREMENT,
`Class Start Time` time DEFAULT NULL,
`Class End Time` time DEFAULT NULL,
`Class Day` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
`Professor ID` int DEFAULT NULL,
PRIMARY KEY (`Class Schedule ID`),
KEY `FK_prof_cs` (`Professor ID`),
KEY `FK_stud_cs` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `course`
--
DROP TABLE IF EXISTS `course`;
CREATE TABLE IF NOT EXISTS `course` (
`CourseID` int NOT NULL AUTO_INCREMENT,
`CourseName` varchar(100) DEFAULT NULL,
`CourseDescription` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
`Professor ID` int DEFAULT NULL,
PRIMARY KEY (`CourseID`),
KEY `FK_stu_course` (`Student ID`),
KEY `FK_prof_course` (`Professor ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `course requirement`
--
DROP TABLE IF EXISTS `course requirement`;
CREATE TABLE IF NOT EXISTS `course requirement` (
`Course Requirement ID` int NOT NULL AUTO_INCREMENT,
`Course Requirement Description` varchar(100) DEFAULT NULL,
`Course ID` int DEFAULT NULL,
PRIMARY KEY (`Course Requirement ID`),
KEY `FK_course_courseReq` (`Course ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `department`
--
DROP TABLE IF EXISTS `department`;
CREATE TABLE IF NOT EXISTS `department` (
`Department ID` int NOT NULL AUTO_INCREMENT,
`DeptName` varchar(100) DEFAULT NULL,
`DeptDescription` varchar(100) DEFAULT NULL,
`DeptHead` varchar(100) DEFAULT NULL,
`Professor ID` int DEFAULT NULL,
PRIMARY KEY (`Department ID`),
KEY `FK_prof_dept` (`Professor ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `department`
--
INSERT INTO `department` (`Department ID`, `DeptName`, `DeptDescription`, `DeptHead`, `Professor ID`) VALUES
(1, 'cse', 'computer', 'gagan', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `department_requirement`
--
DROP TABLE IF EXISTS `department_requirement`;
CREATE TABLE IF NOT EXISTS `department_requirement` (
`Department Requirement_ID` int NOT NULL AUTO_INCREMENT,
`Department Req Description` varchar(100) DEFAULT NULL,
`Min GPA` float DEFAULT NULL,
`Department ID` int DEFAULT NULL,
PRIMARY KEY (`Department Requirement_ID`),
KEY `FK_dept_deptReq` (`Department ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `dining hall`
--
DROP TABLE IF EXISTS `dining hall`;
CREATE TABLE IF NOT EXISTS `dining hall` (
`Hall ID` int NOT NULL AUTO_INCREMENT,
`Hall Description` varchar(100) DEFAULT NULL,
`Hall Name` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`Hall ID`),
KEY `FK_student_dining` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `event`
--
DROP TABLE IF EXISTS `event`;
CREATE TABLE IF NOT EXISTS `event` (
`Event ID` int NOT NULL AUTO_INCREMENT,
`Event Name` varchar(100) DEFAULT NULL,
`Event Description` varchar(100) DEFAULT NULL,
`Event Date` date DEFAULT NULL,
`Event Type` varchar(100) DEFAULT NULL,
`Participants` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`Event ID`),
KEY `FK_student_event` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `fee payment`
--
DROP TABLE IF EXISTS `fee payment`;
CREATE TABLE IF NOT EXISTS `fee payment` (
`Payment ID` int NOT NULL AUTO_INCREMENT,
`Payment Amount` int DEFAULT NULL,
`Payment Date` date DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`Payment ID`),
KEY `FK_stu_Fee` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `grade`
--
DROP TABLE IF EXISTS `grade`;
CREATE TABLE IF NOT EXISTS `grade` (
`Grade ID` int NOT NULL AUTO_INCREMENT,
`Grade Obtained` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`Grade ID`),
KEY `FK_student_grade` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `professor`
--
DROP TABLE IF EXISTS `professor`;
CREATE TABLE IF NOT EXISTS `professor` (
`Professor ID` int NOT NULL AUTO_INCREMENT,
`first_name` varchar(100) DEFAULT NULL,
`last_name` varchar(100) DEFAULT NULL,
`address` varchar(300) DEFAULT NULL,
`date_of_birth` date DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`phone` int DEFAULT NULL,
`gender` varchar(100) DEFAULT NULL,
PRIMARY KEY (`Professor ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `professor`
--
INSERT INTO `professor` (`Professor ID`, `first_name`, `last_name`, `address`, `date_of_birth`, `email`, `phone`, `gender`) VALUES
(1, 'hari', 'vamsi', 'hickory', '2023-04-06', 'h@gmail.com', 132, 'male');
-- --------------------------------------------------------
--
-- Table structure for table `residential facility`
--
DROP TABLE IF EXISTS `residential facility`;
CREATE TABLE IF NOT EXISTS `residential facility` (
`Facility ID` int NOT NULL AUTO_INCREMENT,
`Facility Name` varchar(100) DEFAULT NULL,
`Facility Description` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`Facility ID`),
KEY `FK_stud_resFac` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `section`
--
DROP TABLE IF EXISTS `section`;
CREATE TABLE IF NOT EXISTS `section` (
`Section ID` int NOT NULL AUTO_INCREMENT,
`Section Name` varchar(100) DEFAULT NULL,
`Section Description` varchar(100) DEFAULT NULL,
`Semester` int DEFAULT NULL,
`Course ID` int DEFAULT NULL,
`Student ID` int DEFAULT NULL,
`Professor ID` int DEFAULT NULL,
PRIMARY KEY (`Section ID`),
KEY `FK_couse_sec` (`Course ID`),
KEY `FK_student_sec` (`Student ID`),
KEY `FK_prof_sec` (`Professor ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
DROP TABLE IF EXISTS `student`;
CREATE TABLE IF NOT EXISTS `student` (
`Student ID` int NOT NULL AUTO_INCREMENT,
`first_name` varchar(100) DEFAULT NULL,
`last_name` varchar(100) DEFAULT NULL,
`address` varchar(300) DEFAULT NULL,
`date_of_birth` date DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`phone` int DEFAULT NULL,
`gender` varchar(100) DEFAULT NULL,
`enrollment_date` date DEFAULT NULL,
PRIMARY KEY (`Student ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `student`
--
INSERT INTO `student` (`Student ID`, `first_name`, `last_name`, `address`, `date_of_birth`, `email`, `phone`, `gender`, `enrollment_date`) VALUES
(1, 'hari', 'vamsi', 'elm street', '2222-02-16', 'h@gmail.com', 567, 'male', '2023-04-29'),
(2, 'hari', 'vamsi', 'elm street', '2222-02-16', 'h@gmail.com', 567, 'male', '2023-04-29'),
(3, 'akhila', 'B', 'charlotte street', '2001-10-12', 'bomm@outlook.com', 456789235, '', '2009-12-02');
-- --------------------------------------------------------
--
-- Table structure for table `student feedback`
--
DROP TABLE IF EXISTS `student feedback`;
CREATE TABLE IF NOT EXISTS `student feedback` (
`Feedback ID` int NOT NULL AUTO_INCREMENT,
`Feedback Text` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
`Professor ID` int DEFAULT NULL,
PRIMARY KEY (`Feedback ID`),
KEY `FK_stud_feedback` (`Student ID`),
KEY `FK_prof_feedback` (`Professor ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `transportation`
--
DROP TABLE IF EXISTS `transportation`;
CREATE TABLE IF NOT EXISTS `transportation` (
`T_Facility ID` int NOT NULL AUTO_INCREMENT,
`T_Facility Name` varchar(100) DEFAULT NULL,
`T_Facility Description` varchar(100) DEFAULT NULL,
`Student ID` int DEFAULT NULL,
PRIMARY KEY (`T_Facility ID`),
KEY `FK_student_trans` (`Student ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `assignment`
--
ALTER TABLE `assignment`
ADD CONSTRAINT `FK_student_assgn` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `attendance`
--
ALTER TABLE `attendance`
ADD CONSTRAINT `FK_prof_atten` FOREIGN KEY (`Professor ID`) REFERENCES `professor` (`Professor ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_student_atten` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `class schedule`
--
ALTER TABLE `class schedule`
ADD CONSTRAINT `FK_prof_cs` FOREIGN KEY (`Professor ID`) REFERENCES `professor` (`Professor ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_stud_cs` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `course`
--
ALTER TABLE `course`
ADD CONSTRAINT `FK_prof_course` FOREIGN KEY (`Professor ID`) REFERENCES `professor` (`Professor ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_stu_course` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `course requirement`
--
ALTER TABLE `course requirement`
ADD CONSTRAINT `FK_course_courseReq` FOREIGN KEY (`Course ID`) REFERENCES `course` (`CourseID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `department`
--
ALTER TABLE `department`
ADD CONSTRAINT `FK_prof_dept` FOREIGN KEY (`Professor ID`) REFERENCES `professor` (`Professor ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `department_requirement`
--
ALTER TABLE `department_requirement`
ADD CONSTRAINT `FK_dept_deptReq` FOREIGN KEY (`Department ID`) REFERENCES `department` (`Department ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `dining hall`
--
ALTER TABLE `dining hall`
ADD CONSTRAINT `FK_student_dining` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `event`
--
ALTER TABLE `event`
ADD CONSTRAINT `FK_student_event` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `fee payment`
--
ALTER TABLE `fee payment`
ADD CONSTRAINT `FK_stu_Fee` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `grade`
--
ALTER TABLE `grade`
ADD CONSTRAINT `FK_student_grade` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `residential facility`
--
ALTER TABLE `residential facility`
ADD CONSTRAINT `FK_stud_resFac` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `section`
--
ALTER TABLE `section`
ADD CONSTRAINT `FK_couse_sec` FOREIGN KEY (`Course ID`) REFERENCES `course` (`CourseID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_prof_sec` FOREIGN KEY (`Professor ID`) REFERENCES `professor` (`Professor ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_student_sec` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `student feedback`
--
ALTER TABLE `student feedback`
ADD CONSTRAINT `FK_prof_feedback` FOREIGN KEY (`Professor ID`) REFERENCES `professor` (`Professor ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_stud_feedback` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `transportation`
--
ALTER TABLE `transportation`
ADD CONSTRAINT `FK_student_trans` FOREIGN KEY (`Student ID`) REFERENCES `student` (`Student ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;
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 */;