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),
"course_description" VARCHAR(255),
"other_details" 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 "Departments" (
"department_id" INT,
"department_name" VARCHAR(255),
PRIMARY KEY ("department_id")
);

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





INSERT INTO "Courses" VALUES ("1", "Calculus I", "An introduction to limits, derivatives, and integrals with applications in science and engineering.", "Offered every Fall and Spring semester");
INSERT INTO "Courses" VALUES ("2", "Linear Algebra", "Study of vector spaces, linear transformations, matrices, and systems of linear equations.", "Includes computational and theoretical components");
INSERT INTO "Courses" VALUES ("3", "Discrete Mathematics", "Covers logic, set theory, combinatorics, graph theory, and algorithms.", "Prerequisite for computer science majors");
INSERT INTO "Courses" VALUES ("4", "Advanced Calculus", "A rigorous treatment of multivariable calculus including proofs and theory.", "Offered only in Spring requires Calculus I and II");
INSERT INTO "Courses" VALUES ("5", "Mathematical Modeling", "Application of mathematical methods to solve real-world problems in biology, economics, and engineering.", "Project-based course with interdisciplinary focus");
INSERT INTO "Courses" VALUES ("6", "Math Seminar", "NULL", "Weekly seminar discussing current research topics in mathematics");
INSERT INTO "Courses" VALUES ("7", "Probability and Statistics", "Introduction to probability theory, random variables, distributions, and statistical inference.", "Includes lab sessions with statistical software");
INSERT INTO "Courses" VALUES ("8", "Calculus II", "Continuation of Calculus I focusing on techniques of integration, sequences, and series.", "Offered every Fall and Spring semester");
INSERT INTO "Courses" VALUES ("9", "Math for Educators", "Designed for future teachers covering fundamental math concepts and pedagogy.", "Includes classroom teaching practice");
INSERT INTO "Courses" VALUES ("10", "Partial Differential Equations", "Study of PDEs with applications in physics and engineering.", "Requires Advanced Calculus and Linear Algebra");
INSERT INTO "Degree_Programs" VALUES ("1", "Bachelor of Science in Mathematics");
INSERT INTO "Degree_Programs" VALUES ("2", "Bachelor of Science in Computer Science");
INSERT INTO "Degree_Programs" VALUES ("3", "Bachelor of Arts in Education");
INSERT INTO "Departments" VALUES ("1", "Mathematics");
INSERT INTO "Departments" VALUES ("2", "Computer Science");
INSERT INTO "Departments" VALUES ("3", "Education");
INSERT INTO "Sections" VALUES ("1", "Morning classes");
INSERT INTO "Sections" VALUES ("2", "Evening classes");
INSERT INTO "Sections" VALUES ("3", "Weekend classes");
INSERT INTO "Sections" VALUES ("4", "Online classes");