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 UNIQUE,
"line_1" VARCHAR(255),
"line_2" VARCHAR(255),
"city" VARCHAR(255),
"zip_postcode" VARCHAR(20),
PRIMARY KEY ("address_id")
);

CREATE TABLE "Students" (
"student_id" INT,
"current_address_id" INT,
PRIMARY KEY ("student_id"),
FOREIGN KEY ("current_address_id") REFERENCES "Addresses"("address_id")
);





INSERT INTO "Addresses" VALUES ("1", "123 Main St", "Apt 101", "Anytown", "12345");
INSERT INTO "Addresses" VALUES ("2", "456 Oak Ave", "NULL", "Otherville", "67890");
INSERT INTO "Addresses" VALUES ("3", "789 Pine Ln", "Suite 200", "Smallville", "11223");
INSERT INTO "Addresses" VALUES ("4", "101 Elm Rd", "Unit 5", "Big City", "98765");
INSERT INTO "Addresses" VALUES ("5", "222 Maple Dr", "NULL", "Suburbia", "54321");
INSERT INTO "Addresses" VALUES ("6", "333 Birch Ct", "Building C", "Metropolis", "00000");
INSERT INTO "Addresses" VALUES ("7", "444 Cedar Blvd", "Floor 1", "Rural Area", "99999");
INSERT INTO "Students" VALUES ("1", "1");
INSERT INTO "Students" VALUES ("2", "3");
INSERT INTO "Students" VALUES ("3", "5");
INSERT INTO "Students" VALUES ("4", "2");
INSERT INTO "Students" VALUES ("5", "1");
INSERT INTO "Students" VALUES ("6", "4");
INSERT INTO "Students" VALUES ("7", "6");