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

CREATE TABLE "Students" (
"student_id" INT,
"current_address_id" INT,
"permanent_address_id" INT,
"first_name" VARCHAR(80),
"cell_mobile_number" VARCHAR(40),
"email_address" VARCHAR(40),
PRIMARY KEY ("student_id"),
FOREIGN KEY ("permanent_address_id") REFERENCES "Addresses"("address_id"),
FOREIGN KEY ("current_address_id") REFERENCES "Addresses"("address_id")
);





INSERT INTO "Addresses" VALUES ("1", "123 Main St", "USA");
INSERT INTO "Addresses" VALUES ("2", "456 Oak Ave", "Haiti");
INSERT INTO "Addresses" VALUES ("3", "789 Pine Ln", "Canada");
INSERT INTO "Addresses" VALUES ("4", "101 Maple Dr", "Haiti");
INSERT INTO "Addresses" VALUES ("5", "202 Birch Rd", "USA");
INSERT INTO "Addresses" VALUES ("6", "303 Cedar Blvd", "Mexico");
INSERT INTO "Addresses" VALUES ("7", "404 Elm Ct", "Haiti");
INSERT INTO "Students" VALUES ("1", "1", "2", "Alice", "1234567890", "alice@example.com");
INSERT INTO "Students" VALUES ("2", "3", "4", "Bob", "09700166582", "bob@example.com");
INSERT INTO "Students" VALUES ("3", "5", "1", "Charlie", "9876543210", "charlie@example.com");
INSERT INTO "Students" VALUES ("4", "6", "7", "David", "1122334455", "david@example.com");
INSERT INTO "Students" VALUES ("5", "1", "5", "Eve", "09700166582", "eve@example.com");
INSERT INTO "Students" VALUES ("6", "2", "3", "Frank", "5551234567", "frank@example.com");
INSERT INTO "Students" VALUES ("7", "4", "2", "Grace", "9988776655", "grace@example.com");
INSERT INTO "Students" VALUES ("8", "7", "4", "Heidi", "09700166582", "heidi@example.com");
INSERT INTO "Students" VALUES ("9", "5", "1", "Ivan", "1231231234", "ivan@example.com");
INSERT INTO "Students" VALUES ("10", "6", "7", "Judy", "09700166582", "judy@example.com");