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 "Addresses" VALUES ("1", "United States");
INSERT INTO "Addresses" VALUES ("2", "Canada");
INSERT INTO "Addresses" VALUES ("3", "United Kingdom");
INSERT INTO "Addresses" VALUES ("4", "Australia");
INSERT INTO "Addresses" VALUES ("5", "Germany");
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 "Degree_Programs" VALUES ("4", "Psychology");
INSERT INTO "Degree_Programs" VALUES ("5", "Biology");
INSERT INTO "Student_Enrolment" VALUES ("1", "201801");
INSERT INTO "Student_Enrolment" VALUES ("2", "201802");
INSERT INTO "Student_Enrolment" VALUES ("3", "201901");
INSERT INTO "Student_Enrolment" VALUES ("4", "201902");
INSERT INTO "Student_Enrolment" VALUES ("5", "202001");
INSERT INTO "Students" VALUES ("1", "Alice", "Marie", "Johnson", "2019-05-15 00:00:00");
INSERT INTO "Students" VALUES ("2", "Bob", "Edward", "Smith", "2018-12-20 00:00:00");
INSERT INTO "Students" VALUES ("3", "Charlie", "James", "Brown", "2020-06-10 00:00:00");
INSERT INTO "Students" VALUES ("4", "Diana", "Louise", "Miller", "2017-11-30 00:00:00");
INSERT INTO "Students" VALUES ("5", "Ethan", "Michael", "Davis", "NULL");
INSERT INTO "Students" VALUES ("6", "Fiona", "Grace", "Wilson", "2017-11-30 00:00:00");
INSERT INTO "Students" VALUES ("7", "George", "Henry", "Moore", "2016-08-25 00:00:00");
INSERT INTO "Students" VALUES ("8", "Hannah", "Rose", "Taylor", "2016-08-25 00:00:00");
INSERT INTO "Students" VALUES ("9", "Ian", "Thomas", "Anderson", "2016-08-24 00:00:00");
INSERT INTO "Students" VALUES ("10", "Jane", "Elizabeth", "Thomas", "2016-08-24 00:00:00");