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,
"department_id" INT,
"degree_summary_name" VARCHAR(255),
PRIMARY KEY ("degree_program_id"),
FOREIGN KEY ("department_id") REFERENCES "Departments"("department_id")
);

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

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





INSERT INTO "Departments" VALUES ("1", "Computer Science");
INSERT INTO "Departments" VALUES ("2", "Mathematics");
INSERT INTO "Departments" VALUES ("3", "Physics");
INSERT INTO "Departments" VALUES ("4", "Chemistry");
INSERT INTO "Departments" VALUES ("5", "Biology");
INSERT INTO "Degree_Programs" VALUES ("101", "1", "BSc Computer Science");
INSERT INTO "Degree_Programs" VALUES ("102", "1", "MSc Computer Science");
INSERT INTO "Degree_Programs" VALUES ("201", "2", "BSc Mathematics");
INSERT INTO "Degree_Programs" VALUES ("202", "2", "MSc Mathematics");
INSERT INTO "Degree_Programs" VALUES ("301", "3", "BSc Physics");
INSERT INTO "Degree_Programs" VALUES ("302", "3", "MSc Physics");
INSERT INTO "Degree_Programs" VALUES ("401", "4", "BSc Chemistry");
INSERT INTO "Degree_Programs" VALUES ("402", "4", "MSc Chemistry");
INSERT INTO "Degree_Programs" VALUES ("501", "5", "BSc Biology");
INSERT INTO "Degree_Programs" VALUES ("502", "5", "MSc Biology");
INSERT INTO "Student_Enrolment" VALUES ("1", "101", "1", "1001");
INSERT INTO "Student_Enrolment" VALUES ("2", "101", "1", "1002");
INSERT INTO "Student_Enrolment" VALUES ("3", "101", "2", "1003");
INSERT INTO "Student_Enrolment" VALUES ("4", "101", "2", "1004");
INSERT INTO "Student_Enrolment" VALUES ("5", "101", "3", "1005");
INSERT INTO "Student_Enrolment" VALUES ("6", "101", "3", "1006");
INSERT INTO "Student_Enrolment" VALUES ("7", "101", "4", "1007");
INSERT INTO "Student_Enrolment" VALUES ("8", "101", "4", "1008");
INSERT INTO "Student_Enrolment" VALUES ("9", "102", "1", "1009");
INSERT INTO "Student_Enrolment" VALUES ("10", "102", "1", "1010");
INSERT INTO "Student_Enrolment" VALUES ("11", "201", "1", "1011");
INSERT INTO "Student_Enrolment" VALUES ("12", "201", "2", "1012");
INSERT INTO "Student_Enrolment" VALUES ("13", "201", "2", "1013");
INSERT INTO "Student_Enrolment" VALUES ("14", "202", "3", "1014");
INSERT INTO "Student_Enrolment" VALUES ("15", "301", "1", "1015");
INSERT INTO "Student_Enrolment" VALUES ("16", "301", "1", "1016");
INSERT INTO "Student_Enrolment" VALUES ("17", "301", "2", "1017");
INSERT INTO "Student_Enrolment" VALUES ("18", "401", "1", "1018");
INSERT INTO "Student_Enrolment" VALUES ("19", "401", "2", "1019");
INSERT INTO "Student_Enrolment" VALUES ("20", "501", "1", "1020");
INSERT INTO "Student_Enrolment" VALUES ("21", "501", "2", "1021");
INSERT INTO "Student_Enrolment" VALUES ("22", "501", "3", "1022");
INSERT INTO "Student_Enrolment" VALUES ("23", "501", "3", "1023");
INSERT INTO "Student_Enrolment" VALUES ("24", "501", "4", "1024");
INSERT INTO "Student_Enrolment" VALUES ("25", "501", "4", "1025");
INSERT INTO "Student_Enrolment" VALUES ("26", "501", "4", "1026");
INSERT INTO "Student_Enrolment" VALUES ("27", "501", "4", "1027");
INSERT INTO "Student_Enrolment" VALUES ("28", "501", "4", "1028");
INSERT INTO "Student_Enrolment" VALUES ("29", "501", "4", "1029");
INSERT INTO "Student_Enrolment" VALUES ("30", "501", "4", "1030");