-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsertDummyData.sql
More file actions
111 lines (97 loc) · 3.71 KB
/
InsertDummyData.sql
File metadata and controls
111 lines (97 loc) · 3.71 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
-- Truncate all the Tables
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE Courses;
TRUNCATE TABLE CourseProfessors;
TRUNCATE TABLE Professors;
TRUNCATE TABLE Departments;
TRUNCATE TABLE Semesters;
TRUNCATE TABLE Rooms;
TRUNCATE TABLE TimeSlots;
TRUNCATE TABLE Preferences;
SET FOREIGN_KEY_CHECKS = 1;
-- Insert dummy data into Depratments Table
INSERT INTO Departments (DepartmentName, DepartmentCode) VALUES
('Computer Science and Engineering', 'CSE');
-- Insert dummy data into the Professors Table with ShortName
INSERT INTO Professors (FirstName, LastName, ShortName, DepartmentID, Email, Phone, Status) VALUES
('John', 'Doe', 'JD', 1, 'jdoe@example.com', '123-456-7890', 'Active'),
('Jane', 'Smith', 'JS', 1, 'jsmith@example.com', '098-765-4321', 'Active'),
('Michael', 'Brown', 'MB', 1, 'mbrown@example.com', '234-567-8901', 'Active'),
('Emily', 'Davis', 'ED', 1, 'edavis@example.com', '345-678-9012', 'Active'),
('David', 'Wilson', 'D', 1, 'dwilson@example.com', '456-789-0123', 'Active');
-- Insert dummy data into the Semesters Table with SemesterCode
INSERT INTO Semesters (SemesterName, SemesterCode, IsActive) VALUES
('First Year, First Semester', '1--1', TRUE),
('First Year, Second Semester', '1--2', FALSE),
('Second Year, First Semester', '2--1', TRUE),
('Second Year, Second Semester', '2--2', FALSE),
('Third Year, First Semester', '3--1', TRUE),
('Third Year, Second Semester', '3--2', FALSE),
('Fourth Year, First Semester', '4--1', TRUE),
('Fourth Year, Second Semester', '4--2', FALSE);
-- Insert dummy data into the Courses Table with ShortName and CourseType
INSERT INTO Courses (CourseName, CourseCode, DepartmentID, Credits, CourseType, IsActive) VALUES
('Introduction to Programming', 'CSE101', 1, 3, 'Theory', TRUE),
('Data Structures', 'CSE102', 1, 3, 'Theory', TRUE),
('Computer Networks Lab', 'CSE201', 1, 1, 'Lab', TRUE),
('Database Management Systems', 'CSE202', 1, 3, 'Theory', TRUE),
('Operating Systems Lab', 'CSE203', 1, 1, 'Lab', TRUE),
('Algorithms', 'CSE204', 1, 3, 'Theory', TRUE);
-- Insert dummy data into the CourseProfessors Table
INSERT INTO CourseProfessors (CourseID, ProfessorID) VALUES
(1, 1),
(2, 2),
(3, 3),
(3, 4),
(4, 1),
(5, 1),
(5, 5),
(6, 3);
-- Insert dummy data into the SemestersCourses Table
INSERT INTO SemestersCourses (SemesterID, CourseID) VALUES
(1, 1),
(1, 2),
(2, 3),
(2, 4),
(3, 5),
(3, 6);
-- Insert dummy data into the Rooms Table with RoomType
INSERT INTO Rooms (RoomNumber, Capacity, RoomType, Status) VALUES
('101', 30, 'Classroom', 'Available'),
('102', 40, 'Classroom', 'Available'),
('201', 20, 'Lab', 'Available'),
('202', 25, 'Lab', 'Available'),
('301', 50, 'Classroom', 'Available'),
('302', 15, 'Lab', 'Available');
-- Insert dummy data to TimeSlots Table
INSERT INTO TimeSlots (DayOfWeek, StartTime, EndTime) VALUES
-- Sunday
('Sunday', '09:00:00', '10:20:00'),
('Sunday', '10:25:00', '11:45:00'),
('Sunday', '11:50:00', '13:10:00'),
('Sunday', '14:00:00', '15:20:00'),
('Sunday', '15:25:00', '16:45:00'),
-- Monday
('Monday', '09:00:00', '10:20:00'),
('Monday', '10:25:00', '11:45:00'),
('Monday', '11:50:00', '13:10:00'),
('Monday', '14:00:00', '15:20:00'),
('Monday', '15:25:00', '16:45:00'),
-- Tuesday
('Tuesday', '09:00:00', '10:20:00'),
('Tuesday', '10:25:00', '11:45:00'),
('Tuesday', '11:50:00', '13:10:00'),
('Tuesday', '14:00:00', '15:20:00'),
('Tuesday', '15:25:00', '16:45:00'),
-- Wednesday
('Wednesday', '09:00:00', '10:20:00'),
('Wednesday', '10:25:00', '11:45:00'),
('Wednesday', '11:50:00', '13:10:00'),
('Wednesday', '14:00:00', '15:20:00'),
('Wednesday', '15:25:00', '16:45:00'),
-- Thursday
('Thursday', '09:00:00', '10:20:00'),
('Thursday', '10:25:00', '11:45:00'),
('Thursday', '11:50:00', '13:10:00'),
('Thursday', '14:00:00', '15:20:00'),
('Thursday', '15:25:00', '16:45:00');