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,
"city" VARCHAR(255),
PRIMARY KEY ("address_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),
"email_address" VARCHAR(40),
"date_first_registered" DATETIME,
PRIMARY KEY ("student_id")
);





INSERT INTO "Addresses" VALUES ("1", "New York");
INSERT INTO "Addresses" VALUES ("2", "Los Angeles");
INSERT INTO "Addresses" VALUES ("3", "Chicago");
INSERT INTO "Addresses" VALUES ("4", "Houston");
INSERT INTO "Addresses" VALUES ("5", "Phoenix");
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 "Students" VALUES ("1", "Alice", "Marie", "Johnson", "alice.johnson@example.com", "2018-08-15 08:30:00");
INSERT INTO "Students" VALUES ("2", "Bob", "NULL", "Smith", "bob.smith@example.com", "2018-08-15 08:30:00");
INSERT INTO "Students" VALUES ("3", "Charlie", "Lee", "Brown", "charlie.brown@example.com", "2017-09-01 09:00:00");
INSERT INTO "Students" VALUES ("4", "Diana", "Ann", "Clark", "diana.clark@example.com", "2019-01-10 10:15:00");
INSERT INTO "Students" VALUES ("5", "Ethan", "NULL", "Davis", "ethan.davis@example.com", "2017-09-01 09:00:00");
INSERT INTO "Students" VALUES ("6", "Fiona", "Grace", "Evans", "fiona.evans@example.com", "2017-08-30 07:45:00");
INSERT INTO "Students" VALUES ("7", "George", "Michael", "Harris", "george.harris@example.com", "2017-08-30 07:45:00");
INSERT INTO "Students" VALUES ("8", "Hannah", "NULL", "Jackson", "hannah.jackson@example.com", "2018-05-20 11:00:00");
INSERT INTO "Students" VALUES ("9", "Ian", "Robert", "King", "ian.king@example.com", "2017-08-30 07:44:59");
INSERT INTO "Students" VALUES ("10", "Julia", "Marie", "Lewis", "julia.lewis@example.com", "2017-08-30 07:44:59");