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,
"degree_summary_name" VARCHAR(255),
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", "Thermodynamics");
INSERT INTO "Courses" VALUES ("7", "Fluid Mechanics");
INSERT INTO "Courses" VALUES ("8", "Circuit Analysis");
INSERT INTO "Courses" VALUES ("9", "Digital Logic Design");
INSERT INTO "Courses" VALUES ("10", "Organic Chemistry");
INSERT INTO "Courses" VALUES ("11", "Calculus I");
INSERT INTO "Courses" VALUES ("12", "Linear Algebra");
INSERT INTO "Departments" VALUES ("1", "Computer Science");
INSERT INTO "Departments" VALUES ("2", "Electrical Engineering");
INSERT INTO "Departments" VALUES ("3", "Mechanical Engineering");
INSERT INTO "Departments" VALUES ("4", "Civil Engineering");
INSERT INTO "Departments" VALUES ("5", "Chemical Engineering");
INSERT INTO "Departments" VALUES ("6", "Mathematics");
INSERT INTO "Departments" VALUES ("7", "Physics");
INSERT INTO "Departments" VALUES ("8", "Biology");
INSERT INTO "Departments" VALUES ("9", "English");
INSERT INTO "Departments" VALUES ("10", "History");
INSERT INTO "Degree_Programs" VALUES ("101", "1", "Bachelor of Science in Computer Science");
INSERT INTO "Degree_Programs" VALUES ("102", "1", "Master of Science in Computer Science");
INSERT INTO "Degree_Programs" VALUES ("103", "2", "Bachelor of Science in Electrical Engineering");
INSERT INTO "Degree_Programs" VALUES ("104", "2", "Master of Science in Electrical Engineering");
INSERT INTO "Degree_Programs" VALUES ("105", "3", "Bachelor of Science in Mechanical Engineering");
INSERT INTO "Degree_Programs" VALUES ("106", "3", "Master of Science in Mechanical Engineering");
INSERT INTO "Degree_Programs" VALUES ("107", "4", "Bachelor of Science in Civil Engineering");
INSERT INTO "Degree_Programs" VALUES ("108", "5", "Bachelor of Science in Chemical Engineering");
INSERT INTO "Degree_Programs" VALUES ("109", "6", "Bachelor of Science in Mathematics");
INSERT INTO "Degree_Programs" VALUES ("110", "1", "Ph.D. in Computer Science");
INSERT INTO "Degree_Programs" VALUES ("111", "2", "Ph.D. in Electrical Engineering");
INSERT INTO "Degree_Programs" VALUES ("112", "3", "Ph.D. in Mechanical Engineering");
INSERT INTO "Degree_Programs" VALUES ("113", "4", "Master of Science in Civil Engineering");
INSERT INTO "Degree_Programs" VALUES ("114", "5", "Master of Science in Chemical Engineering");
INSERT INTO "Degree_Programs" VALUES ("115", "6", "Master of Science in Mathematics");
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");