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,
"course_id" INT,
PRIMARY KEY ("section_id"),
FOREIGN KEY ("course_id") REFERENCES "Courses"("course_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 Programming");
INSERT INTO "Courses" VALUES ("102", "Database Management");
INSERT INTO "Courses" VALUES ("103", "Web Development Basics");
INSERT INTO "Courses" VALUES ("104", "Data Structures and Algorithms");
INSERT INTO "Courses" VALUES ("105", "Operating Systems");
INSERT INTO "Courses" VALUES ("106", "Calculus I");
INSERT INTO "Courses" VALUES ("107", "Linear Algebra");
INSERT INTO "Courses" VALUES ("108", "Discrete Mathematics");
INSERT INTO "Courses" VALUES ("109", "Computer Networks");
INSERT INTO "Courses" VALUES ("110", "Software Engineering");
INSERT INTO "Degree_Programs" VALUES ("1", "Bachelor of Computer Science");
INSERT INTO "Degree_Programs" VALUES ("2", "Master of Data Science");
INSERT INTO "Degree_Programs" VALUES ("3", "Associate of Web Development");
INSERT INTO "Degree_Programs" VALUES ("4", "PhD in Artificial Intelligence");
INSERT INTO "Degree_Programs" VALUES ("5", "Bachelor of Mathematics");
INSERT INTO "Sections" VALUES ("1", "101");
INSERT INTO "Sections" VALUES ("2", "101");
INSERT INTO "Sections" VALUES ("3", "102");
INSERT INTO "Sections" VALUES ("4", "102");
INSERT INTO "Sections" VALUES ("5", "103");
INSERT INTO "Sections" VALUES ("6", "104");
INSERT INTO "Sections" VALUES ("7", "104");
INSERT INTO "Sections" VALUES ("8", "104");
INSERT INTO "Sections" VALUES ("9", "105");
INSERT INTO "Sections" VALUES ("10", "106");
INSERT INTO "Sections" VALUES ("11", "106");
INSERT INTO "Sections" VALUES ("12", "107");
INSERT INTO "Sections" VALUES ("13", "108");
INSERT INTO "Sections" VALUES ("14", "108");
INSERT INTO "Sections" VALUES ("15", "108");
INSERT INTO "Sections" VALUES ("16", "109");
INSERT INTO "Sections" VALUES ("17", "110");
INSERT INTO "Sections" VALUES ("18", "110");
INSERT INTO "Sections" VALUES ("19", "110");
INSERT INTO "Sections" VALUES ("20", "110");
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", "101");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1007", "102");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1008", "106");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1009", "107");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1010", "108");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1011", "109");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1012", "110");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1013", "103");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1014", "104");
INSERT INTO "Student_Enrolment_Courses" VALUES ("1015", "105");