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 Elm Rd", "Haiti");
INSERT INTO "Addresses" VALUES ("5", "202 Birch Blvd", "USA");
INSERT INTO "Addresses" VALUES ("6", "303 Cedar Ct", "Mexico");
INSERT INTO "Addresses" VALUES ("7", "404 Willow Way", "Haiti");
INSERT INTO "Addresses" VALUES ("8", "505 Maple Dr", "USA");
INSERT INTO "Addresses" VALUES ("9", "606 Spruce St", "Haiti");
INSERT INTO "Addresses" VALUES ("10", "707 Fir Ave", "Canada");
INSERT INTO "Students" VALUES ("1", "1", "2", "Alice", "09700166582", "alice@example.com");
INSERT INTO "Students" VALUES ("2", "3", "1", "Bob", "1234567890", "bob@example.com");
INSERT INTO "Students" VALUES ("3", "5", "4", "Charlie", "9876543210", "charlie@example.com");
INSERT INTO "Students" VALUES ("4", "6", "5", "David", "09700166582", "david@example.com");
INSERT INTO "Students" VALUES ("5", "8", "7", "Eve", "1122334455", "eve@example.com");
INSERT INTO "Students" VALUES ("6", "1", "9", "Frank", "6677889900", "frank@example.com");
INSERT INTO "Students" VALUES ("7", "2", "1", "Grace", "09700166582", "grace@example.com");
INSERT INTO "Students" VALUES ("8", "4", "3", "Heidi", "5544332211", "heidi@example.com");
INSERT INTO "Students" VALUES ("9", "7", "6", "Ivan", "09700166582", "ivan@example.com");
INSERT INTO "Students" VALUES ("10", "9", "8", "Judy", "9988776655", "judy@example.com");
INSERT INTO "Students" VALUES ("11", "10", "2", "Kevin", "1122334455", "kevin@example.com");
INSERT INTO "Students" VALUES ("12", "1", "4", "Liam", "09700166582", "liam@example.com");
INSERT INTO "Students" VALUES ("13", "3", "7", "Mia", "6677889900", "mia@example.com");
INSERT INTO "Students" VALUES ("14", "5", "9", "Noah", "1234567890", "noah@example.com");
INSERT INTO "Students" VALUES ("15", "6", "1", "Olivia", "09700166582", "olivia@example.com");