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 "Degree_Programs" (
"degree_program_id" INT,
"degree_summary_name" VARCHAR(255),
PRIMARY KEY ("degree_program_id")
);

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

CREATE TABLE "Students" (
"student_id" INT,
"first_name" VARCHAR(80),
"middle_name" VARCHAR(40),
"last_name" VARCHAR(40),
"date_first_registered" DATETIME,
"date_left" DATETIME,
PRIMARY KEY ("student_id")
);





INSERT INTO "Degree_Programs" VALUES ("1", "Computer Science");
INSERT INTO "Degree_Programs" VALUES ("2", "Mechanical Engineering");
INSERT INTO "Degree_Programs" VALUES ("3", "Business Administration");
INSERT INTO "Semesters" VALUES ("1", "Fall 2020");
INSERT INTO "Semesters" VALUES ("2", "Spring 2021");
INSERT INTO "Semesters" VALUES ("3", "Fall 2021");
INSERT INTO "Students" VALUES ("1", "Alice", "Marie", "Johnson", "2018-08-15 09:00:00", "NULL");
INSERT INTO "Students" VALUES ("2", "Bob", "Lee", "Smith", "2019-01-10 10:30:00", "NULL");
INSERT INTO "Students" VALUES ("3", "Charlie", "Ann", "Brown", "2018-08-15 09:00:01", "2022-05-20 15:00:00");
INSERT INTO "Students" VALUES ("4", "Diana", "Rose", "Miller", "2020-09-01 08:45:00", "NULL");
INSERT INTO "Students" VALUES ("5", "Ethan", "James", "Davis", "2017-07-20 11:00:00", "2019-12-15 12:00:00");