PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Degree_Programs" (
"degree_program_id" INT UNIQUE,
"degree_summary_name" VARCHAR(255),
"degree_summary_description" VARCHAR(255),
PRIMARY KEY ("degree_program_id")
);

CREATE TABLE "Departments" (
"department_id" INT,
"department_name" VARCHAR(255),
PRIMARY KEY ("department_id")
);

CREATE TABLE "Student_Enrolment" (
"student_enrolment_id" INT UNIQUE,
"degree_program_id" INT,
"student_id" INT,
PRIMARY KEY ("student_enrolment_id"),
FOREIGN KEY ("student_id") REFERENCES "Students"("student_id"),
FOREIGN KEY ("degree_program_id") REFERENCES "Degree_Programs"("degree_program_id")
);

CREATE TABLE "Student_Enrolment_Courses" (
"student_course_id" INT,
"course_id" INT,
PRIMARY KEY ("student_course_id")
);

CREATE TABLE "Students" (
"student_id" INT,
"first_name" VARCHAR(80),
PRIMARY KEY ("student_id")
);





INSERT INTO "Degree_Programs" VALUES ("1", "Computer Science", "Focuses on algorithms, data structures, and software development.");
INSERT INTO "Degree_Programs" VALUES ("2", "Electrical Engineering", "Covers circuits, electronics, and power systems.");
INSERT INTO "Degree_Programs" VALUES ("3", "Mechanical Engineering", "Deals with design, analysis, and manufacturing of mechanical systems.");
INSERT INTO "Degree_Programs" VALUES ("4", "Business Administration", "Focuses on management, finance, and marketing principles.");
INSERT INTO "Degree_Programs" VALUES ("5", "Biology", "Studies living organisms and their vital processes.");
INSERT INTO "Degree_Programs" VALUES ("6", "Mathematics", "Explores numbers, quantity, and space.");
INSERT INTO "Departments" VALUES ("101", "Computer Science Department");
INSERT INTO "Departments" VALUES ("102", "Electrical Engineering Department");
INSERT INTO "Departments" VALUES ("103", "Mechanical Engineering Department");
INSERT INTO "Departments" VALUES ("104", "Business Department");
INSERT INTO "Departments" VALUES ("105", "Biology Department");
INSERT INTO "Departments" VALUES ("106", "Mathematics Department");
INSERT INTO "Students" VALUES ("1001", "Alice");
INSERT INTO "Students" VALUES ("1002", "Bob");
INSERT INTO "Students" VALUES ("1003", "Charlie");
INSERT INTO "Students" VALUES ("1004", "David");
INSERT INTO "Students" VALUES ("1005", "Eve");
INSERT INTO "Students" VALUES ("1006", "Frank");
INSERT INTO "Students" VALUES ("1007", "Grace");
INSERT INTO "Students" VALUES ("1008", "Heidi");
INSERT INTO "Students" VALUES ("1009", "Ivan");
INSERT INTO "Students" VALUES ("1010", "Judy");
INSERT INTO "Students" VALUES ("1011", "Kevin");
INSERT INTO "Students" VALUES ("1012", "Liam");
INSERT INTO "Students" VALUES ("1013", "Mia");
INSERT INTO "Students" VALUES ("1014", "Noah");
INSERT INTO "Students" VALUES ("1015", "Olivia");
INSERT INTO "Student_Enrolment" VALUES ("1", "1", "1001");
INSERT INTO "Student_Enrolment" VALUES ("2", "1", "1002");
INSERT INTO "Student_Enrolment" VALUES ("3", "1", "1003");
INSERT INTO "Student_Enrolment" VALUES ("4", "2", "1004");
INSERT INTO "Student_Enrolment" VALUES ("5", "2", "1005");
INSERT INTO "Student_Enrolment" VALUES ("6", "3", "1006");
INSERT INTO "Student_Enrolment" VALUES ("7", "4", "1007");
INSERT INTO "Student_Enrolment" VALUES ("8", "4", "1008");
INSERT INTO "Student_Enrolment" VALUES ("9", "4", "1009");
INSERT INTO "Student_Enrolment" VALUES ("10", "1", "1010");
INSERT INTO "Student_Enrolment" VALUES ("11", "1", "1011");
INSERT INTO "Student_Enrolment" VALUES ("12", "2", "1012");
INSERT INTO "Student_Enrolment" VALUES ("13", "3", "1013");
INSERT INTO "Student_Enrolment" VALUES ("14", "4", "1014");
INSERT INTO "Student_Enrolment" VALUES ("15", "5", "1015");
INSERT INTO "Student_Enrolment" VALUES ("16", "1", "1004");
INSERT INTO "Student_Enrolment" VALUES ("17", "1", "1005");
INSERT INTO "Student_Enrolment" VALUES ("18", "4", "1001");
INSERT INTO "Student_Enrolment" VALUES ("19", "4", "1002");
INSERT INTO "Student_Enrolment" VALUES ("20", "4", "1003");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1", "101");
INSERT INTO "Student_Enrolment_Courses" VALUES ("2", "102");
INSERT INTO "Student_Enrolment_Courses" VALUES ("3", "103");
INSERT INTO "Student_Enrolment_Courses" VALUES ("4", "201");
INSERT INTO "Student_Enrolment_Courses" VALUES ("5", "202");
INSERT INTO "Student_Enrolment_Courses" VALUES ("6", "301");
INSERT INTO "Student_Enrolment_Courses" VALUES ("7", "401");
INSERT INTO "Student_Enrolment_Courses" VALUES ("8", "402");
INSERT INTO "Student_Enrolment_Courses" VALUES ("9", "403");
INSERT INTO "Student_Enrolment_Courses" VALUES ("10", "104");
INSERT INTO "Student_Enrolment_Courses" VALUES ("11", "105");
INSERT INTO "Student_Enrolment_Courses" VALUES ("12", "203");
INSERT INTO "Student_Enrolment_Courses" VALUES ("13", "302");
INSERT INTO "Student_Enrolment_Courses" VALUES ("14", "404");
INSERT INTO "Student_Enrolment_Courses" VALUES ("15", "501");