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

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





INSERT INTO "Addresses" VALUES ("1", "Port-au-Prince", "Haiti");
INSERT INTO "Addresses" VALUES ("2", "Cap-Haïtien", "Haiti");
INSERT INTO "Addresses" VALUES ("3", "Miami", "USA");
INSERT INTO "Addresses" VALUES ("4", "Toronto", "Canada");
INSERT INTO "Addresses" VALUES ("5", "Paris", "France");
INSERT INTO "Addresses" VALUES ("6", "Lima", "Peru");
INSERT INTO "Students" VALUES ("101", "1", "Jean", "Pierre", "09700166582", "jean.pierre@example.com");
INSERT INTO "Students" VALUES ("102", "3", "Marie", "Clair", "09876543210", "marie.clair@example.com");
INSERT INTO "Students" VALUES ("103", "2", "Luc", "Durand", "09123456789", "luc.durand@example.com");
INSERT INTO "Students" VALUES ("104", "4", "Sophie", "Martin", "09700166582", "sophie.martin@example.com");
INSERT INTO "Students" VALUES ("105", "5", "Paul", "Lemoine", "09999999999", "paul.lemoine@example.com");
INSERT INTO "Students" VALUES ("106", "6", "Ana", "Gomez", "09000000000", "ana.gomez@example.com");
INSERT INTO "Students" VALUES ("107", "3", "David", "Brown", "09700166582", "david.brown@example.com");
INSERT INTO "Students" VALUES ("108", "1", "Isabelle", "Jean", "09333333333", "isabelle.jean@example.com");
INSERT INTO "Students" VALUES ("109", "4", "Marc", "Dupont", "09222222222", "marc.dupont@example.com");
INSERT INTO "Students" VALUES ("110", "5", "Claire", "Moreau", "09111111111", "claire.moreau@example.com");