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

CREATE TABLE "Degree_Programs" (
"degree_program_id" INT,
"department_id" INT,
PRIMARY KEY ("degree_program_id"),
FOREIGN KEY ("department_id") REFERENCES "Departments"("department_id")
);

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

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

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





INSERT INTO "Courses" VALUES ("1", "Introduction to Programming");
INSERT INTO "Courses" VALUES ("2", "Data Structures");
INSERT INTO "Courses" VALUES ("3", "Algorithms");
INSERT INTO "Courses" VALUES ("4", "Database Systems");
INSERT INTO "Courses" VALUES ("5", "Operating Systems");
INSERT INTO "Courses" VALUES ("6", "Calculus I");
INSERT INTO "Courses" VALUES ("7", "Linear Algebra");
INSERT INTO "Courses" VALUES ("8", "Discrete Mathematics");
INSERT INTO "Courses" VALUES ("9", "Thermodynamics");
INSERT INTO "Courses" VALUES ("10", "Fluid Mechanics");
INSERT INTO "Courses" VALUES ("11", "Circuit Analysis");
INSERT INTO "Courses" VALUES ("12", "Digital Logic Design");
INSERT INTO "Courses" VALUES ("13", "Organic Chemistry I");
INSERT INTO "Courses" VALUES ("14", "Biochemistry");
INSERT INTO "Courses" VALUES ("15", "Genetics");
INSERT INTO "Courses" VALUES ("16", "Microeconomics");
INSERT INTO "Courses" VALUES ("17", "Macroeconomics");
INSERT INTO "Courses" VALUES ("18", "Financial Accounting");
INSERT INTO "Courses" VALUES ("19", "Marketing Principles");
INSERT INTO "Courses" VALUES ("20", "Business Ethics");
INSERT INTO "Departments" VALUES ("1", "Computer Science");
INSERT INTO "Departments" VALUES ("2", "Mathematics");
INSERT INTO "Departments" VALUES ("3", "Electrical Engineering");
INSERT INTO "Departments" VALUES ("4", "Mechanical Engineering");
INSERT INTO "Departments" VALUES ("5", "Biology");
INSERT INTO "Departments" VALUES ("6", "Chemistry");
INSERT INTO "Departments" VALUES ("7", "Economics");
INSERT INTO "Departments" VALUES ("8", "Business Administration");
INSERT INTO "Departments" VALUES ("9", "Physics");
INSERT INTO "Departments" VALUES ("10", "History");
INSERT INTO "Degree_Programs" VALUES ("101", "1");
INSERT INTO "Degree_Programs" VALUES ("102", "1");
INSERT INTO "Degree_Programs" VALUES ("103", "1");
INSERT INTO "Degree_Programs" VALUES ("104", "1");
INSERT INTO "Degree_Programs" VALUES ("201", "2");
INSERT INTO "Degree_Programs" VALUES ("202", "2");
INSERT INTO "Degree_Programs" VALUES ("301", "3");
INSERT INTO "Degree_Programs" VALUES ("302", "3");
INSERT INTO "Degree_Programs" VALUES ("401", "4");
INSERT INTO "Degree_Programs" VALUES ("501", "5");
INSERT INTO "Degree_Programs" VALUES ("502", "5");
INSERT INTO "Degree_Programs" VALUES ("601", "6");
INSERT INTO "Degree_Programs" VALUES ("701", "7");
INSERT INTO "Degree_Programs" VALUES ("702", "7");
INSERT INTO "Degree_Programs" VALUES ("801", "8");
INSERT INTO "Degree_Programs" VALUES ("802", "8");
INSERT INTO "Degree_Programs" VALUES ("803", "8");
INSERT INTO "Degree_Programs" VALUES ("901", "9");
INSERT INTO "Degree_Programs" VALUES ("1001", "10");
INSERT INTO "Degree_Programs" VALUES ("1002", "10");
INSERT INTO "Sections" VALUES ("1", "Fall 2023 - Section A");
INSERT INTO "Sections" VALUES ("2", "Fall 2023 - Section B");
INSERT INTO "Sections" VALUES ("3", "Spring 2024 - Section A");
INSERT INTO "Sections" VALUES ("4", "Spring 2024 - Section B");
INSERT INTO "Sections" VALUES ("5", "Summer 2024 - Section A");
INSERT INTO "Semesters" VALUES ("1", "Fall 2023");
INSERT INTO "Semesters" VALUES ("2", "Spring 2024");
INSERT INTO "Semesters" VALUES ("3", "Summer 2024");
INSERT INTO "Semesters" VALUES ("4", "Fall 2024");
INSERT INTO "Semesters" VALUES ("5", "Spring 2025");