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 "Addresses" (
"address_id" INT,
"country" VARCHAR(255),
PRIMARY KEY ("address_id")
);

CREATE TABLE "Degree_Programs" (
"degree_program_id" INT,
"degree_summary_name" VARCHAR(255),
PRIMARY KEY ("degree_program_id")
);

CREATE TABLE "Student_Enrolment" (
"student_enrolment_id" INT,
"semester_id" INT,
PRIMARY KEY ("student_enrolment_id")
);

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





INSERT INTO "Students" VALUES ("1", "Alice", "M.", "Johnson", "2018-05-15");
INSERT INTO "Students" VALUES ("2", "Bob", "K.", "Smith", "2017-12-20");
INSERT INTO "Students" VALUES ("3", "Charlie", "L.", "Brown", "2017-12-20");
INSERT INTO "Students" VALUES ("4", "Diana", "N.", "Evans", "2019-06-10");
INSERT INTO "Students" VALUES ("5", "Ethan", "NULL", "Williams", "NULL");
INSERT INTO "Students" VALUES ("6", "Fiona", "O.", "Davis", "2020-01-30");
INSERT INTO "Students" VALUES ("7", "George", "P.", "Miller", "2017-12-20");
INSERT INTO "Students" VALUES ("8", "Hannah", "NULL", "Wilson", "2018-11-05");
INSERT INTO "Addresses" VALUES ("1", "USA");
INSERT INTO "Addresses" VALUES ("2", "Canada");
INSERT INTO "Degree_Programs" VALUES ("1", "Computer Science");
INSERT INTO "Degree_Programs" VALUES ("2", "Mechanical Engineering");
INSERT INTO "Student_Enrolment" VALUES ("1", "101");
INSERT INTO "Student_Enrolment" VALUES ("2", "102");
INSERT INTO "Student_Enrolment" VALUES ("3", "103");
INSERT INTO "Student_Enrolment" VALUES ("4", "104");
INSERT INTO "Student_Enrolment" VALUES ("5", "105");
INSERT INTO "Student_Enrolment" VALUES ("6", "106");
INSERT INTO "Student_Enrolment" VALUES ("7", "107");
INSERT INTO "Student_Enrolment" VALUES ("8", "108");