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 "Courses" (
"course_id" INT UNIQUE,
"course_name" VARCHAR(255),
PRIMARY KEY ("course_id")
);

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

CREATE TABLE "Sections" (
"section_id" INT,
"section_name" VARCHAR(255),
PRIMARY KEY ("section_id")
);

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





INSERT INTO "Courses" VALUES ("101", "Introduction to Psychology");
INSERT INTO "Courses" VALUES ("102", "Calculus I");
INSERT INTO "Courses" VALUES ("103", "World History");
INSERT INTO "Courses" VALUES ("104", "Organic Chemistry");
INSERT INTO "Courses" VALUES ("105", "Microeconomics");
INSERT INTO "Courses" VALUES ("106", "Introduction to Programming");
INSERT INTO "Courses" VALUES ("107", "English Literature");
INSERT INTO "Courses" VALUES ("108", "Physics I");
INSERT INTO "Courses" VALUES ("109", "Art History");
INSERT INTO "Courses" VALUES ("110", "Sociology Basics");
INSERT INTO "Degree_Programs" VALUES ("1", "Bachelor of Science");
INSERT INTO "Degree_Programs" VALUES ("2", "Bachelor of Arts");
INSERT INTO "Degree_Programs" VALUES ("3", "Bachelor of Engineering");
INSERT INTO "Sections" VALUES ("201", "Morning");
INSERT INTO "Sections" VALUES ("202", "Afternoon");
INSERT INTO "Sections" VALUES ("203", "Evening");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1001", "101");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1002", "102");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1003", "103");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1004", "104");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1005", "105");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1006", "106");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1007", "107");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1008", "108");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1009", "109");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1010", "110");