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),
"degree_summary_description" VARCHAR(255),
PRIMARY KEY ("degree_program_id")
);

CREATE TABLE "Semesters" (
"semester_id" INT,
"semester_name" VARCHAR(255),
PRIMARY KEY ("semester_id")
);

CREATE TABLE "Student_Enrolment" (
"student_enrolment_id" INT,
"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 "Students" (
"student_id" INT,
"first_name" VARCHAR(80),
PRIMARY KEY ("student_id")
);





INSERT INTO "Degree_Programs" VALUES ("1", "10", "Computer Science BSc", "Bachelor of Science in Computer Science");
INSERT INTO "Degree_Programs" VALUES ("2", "20", "Mechanical Engineering BEng", "Bachelor of Engineering in Mechanical Engineering");
INSERT INTO "Degree_Programs" VALUES ("3", "30", "Business Administration BBA", "Bachelor of Business Administration");
INSERT INTO "Degree_Programs" VALUES ("4", "40", "Psychology BA", "Bachelor of Arts in Psychology");
INSERT INTO "Degree_Programs" VALUES ("5", "50", "Philosophy BA", "Bachelor of Arts in Philosophy");
INSERT INTO "Degree_Programs" VALUES ("6", "60", "Civil Engineering BEng", "Bachelor of Engineering in Civil Engineering");
INSERT INTO "Degree_Programs" VALUES ("7", "70", "Mathematics BSc", "Bachelor of Science in Mathematics");
INSERT INTO "Students" VALUES ("101", "Alice");
INSERT INTO "Students" VALUES ("102", "Bob");
INSERT INTO "Students" VALUES ("103", "Charlie");
INSERT INTO "Students" VALUES ("104", "Diana");
INSERT INTO "Students" VALUES ("105", "Ethan");
INSERT INTO "Students" VALUES ("106", "Fiona");
INSERT INTO "Students" VALUES ("107", "George");
INSERT INTO "Students" VALUES ("108", "Hannah");
INSERT INTO "Students" VALUES ("109", "Ian");
INSERT INTO "Students" VALUES ("110", "Jane");
INSERT INTO "Students" VALUES ("111", "Kevin");
INSERT INTO "Students" VALUES ("112", "Laura");
INSERT INTO "Students" VALUES ("113", "Mike");
INSERT INTO "Students" VALUES ("114", "Nina");
INSERT INTO "Students" VALUES ("115", "Oscar");
INSERT INTO "Students" VALUES ("116", "Paula");
INSERT INTO "Students" VALUES ("117", "Quinn");
INSERT INTO "Students" VALUES ("118", "Rachel");
INSERT INTO "Students" VALUES ("119", "Steve");
INSERT INTO "Students" VALUES ("120", "Tina");
INSERT INTO "Student_Enrolment" VALUES ("1001", "1", "101");
INSERT INTO "Student_Enrolment" VALUES ("1002", "1", "102");
INSERT INTO "Student_Enrolment" VALUES ("1003", "1", "103");
INSERT INTO "Student_Enrolment" VALUES ("1004", "1", "104");
INSERT INTO "Student_Enrolment" VALUES ("1005", "1", "105");
INSERT INTO "Student_Enrolment" VALUES ("1006", "1", "106");
INSERT INTO "Student_Enrolment" VALUES ("1007", "1", "107");
INSERT INTO "Student_Enrolment" VALUES ("1008", "1", "108");
INSERT INTO "Student_Enrolment" VALUES ("1009", "1", "109");
INSERT INTO "Student_Enrolment" VALUES ("1010", "1", "110");
INSERT INTO "Student_Enrolment" VALUES ("1011", "2", "111");
INSERT INTO "Student_Enrolment" VALUES ("1012", "2", "112");
INSERT INTO "Student_Enrolment" VALUES ("1013", "2", "113");
INSERT INTO "Student_Enrolment" VALUES ("1014", "2", "114");
INSERT INTO "Student_Enrolment" VALUES ("1015", "2", "115");
INSERT INTO "Student_Enrolment" VALUES ("1016", "3", "116");
INSERT INTO "Student_Enrolment" VALUES ("1017", "3", "117");
INSERT INTO "Student_Enrolment" VALUES ("1018", "3", "118");
INSERT INTO "Student_Enrolment" VALUES ("1019", "3", "119");
INSERT INTO "Student_Enrolment" VALUES ("1020", "3", "120");
INSERT INTO "Student_Enrolment" VALUES ("1021", "4", "101");
INSERT INTO "Student_Enrolment" VALUES ("1022", "4", "102");
INSERT INTO "Student_Enrolment" VALUES ("1023", "5", "103");
INSERT INTO "Student_Enrolment" VALUES ("1024", "6", "104");
INSERT INTO "Student_Enrolment" VALUES ("1025", "6", "105");
INSERT INTO "Student_Enrolment" VALUES ("1026", "7", "106");
INSERT INTO "Student_Enrolment" VALUES ("1027", "7", "107");
INSERT INTO "Student_Enrolment" VALUES ("1028", "3", "108");
INSERT INTO "Student_Enrolment" VALUES ("1029", "3", "109");
INSERT INTO "Student_Enrolment" VALUES ("1030", "2", "110");
INSERT INTO "Student_Enrolment" VALUES ("1031", "7", "111");
INSERT INTO "Student_Enrolment" VALUES ("1032", "7", "112");
INSERT INTO "Student_Enrolment" VALUES ("1033", "5", "113");
INSERT INTO "Student_Enrolment" VALUES ("1034", "4", "114");
INSERT INTO "Student_Enrolment" VALUES ("1035", "6", "115");
INSERT INTO "Student_Enrolment" VALUES ("1036", "2", "116");
INSERT INTO "Student_Enrolment" VALUES ("1037", "1", "117");
INSERT INTO "Student_Enrolment" VALUES ("1038", "1", "118");
INSERT INTO "Student_Enrolment" VALUES ("1039", "3", "119");
INSERT INTO "Student_Enrolment" VALUES ("1040", "3", "120");