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

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

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

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





INSERT INTO "Degree_Programs" VALUES ("1", "Computer Science");
INSERT INTO "Degree_Programs" VALUES ("2", "Business Administration");
INSERT INTO "Degree_Programs" VALUES ("3", "Mechanical Engineering");
INSERT INTO "Semesters" VALUES ("1", "Fall 2023", "Fall semester 2023");
INSERT INTO "Semesters" VALUES ("2", "Spring 2024", "Spring semester 2024");
INSERT INTO "Semesters" VALUES ("3", "Summer 2024", "Summer semester 2024");
INSERT INTO "Semesters" VALUES ("4", "Winter 2024", "Winter semester 2024");
INSERT INTO "Semesters" VALUES ("5", "Fall 2024", "Fall semester 2024");
INSERT INTO "Students" VALUES ("1", "Alice");
INSERT INTO "Students" VALUES ("2", "Bob");
INSERT INTO "Students" VALUES ("3", "Charlie");
INSERT INTO "Students" VALUES ("4", "Diana");
INSERT INTO "Students" VALUES ("5", "Ethan");
INSERT INTO "Students" VALUES ("6", "Fiona");
INSERT INTO "Students" VALUES ("7", "George");
INSERT INTO "Students" VALUES ("8", "Hannah");
INSERT INTO "Students" VALUES ("9", "Ian");
INSERT INTO "Students" VALUES ("10", "Jane");
INSERT INTO "Students" VALUES ("11", "Kyle");
INSERT INTO "Students" VALUES ("12", "Laura");
INSERT INTO "Students" VALUES ("13", "Mike");
INSERT INTO "Students" VALUES ("14", "Nina");
INSERT INTO "Students" VALUES ("15", "Oscar");
INSERT INTO "Students" VALUES ("16", "Paula");
INSERT INTO "Students" VALUES ("17", "Quinn");
INSERT INTO "Students" VALUES ("18", "Rachel");
INSERT INTO "Students" VALUES ("19", "Steve");
INSERT INTO "Students" VALUES ("20", "Tina");
INSERT INTO "Student_Enrolment" VALUES ("1", "1", "1");
INSERT INTO "Student_Enrolment" VALUES ("2", "1", "2");
INSERT INTO "Student_Enrolment" VALUES ("3", "1", "3");
INSERT INTO "Student_Enrolment" VALUES ("4", "1", "4");
INSERT INTO "Student_Enrolment" VALUES ("5", "1", "5");
INSERT INTO "Student_Enrolment" VALUES ("6", "1", "6");
INSERT INTO "Student_Enrolment" VALUES ("7", "1", "7");
INSERT INTO "Student_Enrolment" VALUES ("8", "1", "8");
INSERT INTO "Student_Enrolment" VALUES ("9", "1", "9");
INSERT INTO "Student_Enrolment" VALUES ("10", "1", "10");
INSERT INTO "Student_Enrolment" VALUES ("11", "2", "1");
INSERT INTO "Student_Enrolment" VALUES ("12", "2", "2");
INSERT INTO "Student_Enrolment" VALUES ("13", "2", "3");
INSERT INTO "Student_Enrolment" VALUES ("14", "2", "4");
INSERT INTO "Student_Enrolment" VALUES ("15", "2", "5");
INSERT INTO "Student_Enrolment" VALUES ("16", "2", "6");
INSERT INTO "Student_Enrolment" VALUES ("17", "2", "7");
INSERT INTO "Student_Enrolment" VALUES ("18", "2", "8");
INSERT INTO "Student_Enrolment" VALUES ("19", "2", "9");
INSERT INTO "Student_Enrolment" VALUES ("20", "2", "10");
INSERT INTO "Student_Enrolment" VALUES ("21", "2", "11");
INSERT INTO "Student_Enrolment" VALUES ("22", "2", "12");
INSERT INTO "Student_Enrolment" VALUES ("23", "3", "13");
INSERT INTO "Student_Enrolment" VALUES ("24", "3", "14");
INSERT INTO "Student_Enrolment" VALUES ("25", "3", "15");
INSERT INTO "Student_Enrolment" VALUES ("26", "4", "16");
INSERT INTO "Student_Enrolment" VALUES ("27", "4", "17");
INSERT INTO "Student_Enrolment" VALUES ("28", "4", "18");
INSERT INTO "Student_Enrolment" VALUES ("29", "4", "19");
INSERT INTO "Student_Enrolment" VALUES ("30", "4", "20");
INSERT INTO "Student_Enrolment" VALUES ("31", "5", "1");
INSERT INTO "Student_Enrolment" VALUES ("32", "5", "2");
INSERT INTO "Student_Enrolment" VALUES ("33", "5", "3");
INSERT INTO "Student_Enrolment" VALUES ("34", "5", "4");
INSERT INTO "Student_Enrolment" VALUES ("35", "5", "5");
INSERT INTO "Student_Enrolment" VALUES ("36", "5", "6");
INSERT INTO "Student_Enrolment" VALUES ("37", "5", "7");
INSERT INTO "Student_Enrolment" VALUES ("38", "5", "8");
INSERT INTO "Student_Enrolment" VALUES ("39", "5", "9");
INSERT INTO "Student_Enrolment" VALUES ("40", "5", "10");
INSERT INTO "Student_Enrolment" VALUES ("41", "5", "11");
INSERT INTO "Student_Enrolment" VALUES ("42", "5", "12");
INSERT INTO "Student_Enrolment" VALUES ("43", "5", "13");
INSERT INTO "Student_Enrolment" VALUES ("44", "5", "14");
INSERT INTO "Student_Enrolment" VALUES ("45", "5", "15");
INSERT INTO "Student_Enrolment" VALUES ("46", "5", "16");
INSERT INTO "Student_Enrolment" VALUES ("47", "5", "17");
INSERT INTO "Student_Enrolment" VALUES ("48", "5", "18");
INSERT INTO "Student_Enrolment" VALUES ("49", "5", "19");
INSERT INTO "Student_Enrolment" VALUES ("50", "5", "20");
INSERT INTO "Student_Enrolment" VALUES ("51", "3", "1");
INSERT INTO "Student_Enrolment" VALUES ("52", "3", "2");
INSERT INTO "Student_Enrolment" VALUES ("53", "3", "3");
INSERT INTO "Student_Enrolment" VALUES ("54", "3", "4");
INSERT INTO "Student_Enrolment" VALUES ("55", "3", "5");
INSERT INTO "Student_Enrolment" VALUES ("56", "3", "6");
INSERT INTO "Student_Enrolment" VALUES ("57", "3", "7");
INSERT INTO "Student_Enrolment" VALUES ("58", "3", "8");
INSERT INTO "Student_Enrolment" VALUES ("59", "3", "9");
INSERT INTO "Student_Enrolment" VALUES ("60", "3", "10");