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 "employee" (
"Employee_ID" INT UNIQUE,
"Age" INT,
"City" TEXT,
PRIMARY KEY ("Employee_ID")
);

CREATE TABLE "evaluation" (
"Employee_ID" TEXT,
"Year_awarded" TEXT,
PRIMARY KEY ("Employee_ID", "Year_awarded"),
FOREIGN KEY ("Employee_ID") REFERENCES "employee"("Employee_ID")
);

CREATE TABLE "hiring" (
"Shop_ID" INT,
"Employee_ID" INT,
PRIMARY KEY ("Employee_ID"),
FOREIGN KEY ("Shop_ID") REFERENCES "shop"("Shop_ID")
);

CREATE TABLE "shop" (
"Shop_ID" INT,
"Location" TEXT,
PRIMARY KEY ("Shop_ID")
);





INSERT INTO "employee" VALUES ("1", "25", "New York");
INSERT INTO "employee" VALUES ("2", "28", "New York");
INSERT INTO "employee" VALUES ("3", "35", "New York");
INSERT INTO "employee" VALUES ("4", "22", "Los Angeles");
INSERT INTO "employee" VALUES ("5", "29", "Los Angeles");
INSERT INTO "employee" VALUES ("6", "40", "Chicago");
INSERT INTO "employee" VALUES ("7", "20", "Houston");
INSERT INTO "employee" VALUES ("8", "21", "Houston");
INSERT INTO "employee" VALUES ("9", "23", "Houston");
INSERT INTO "employee" VALUES ("10", "30", "Miami");
INSERT INTO "employee" VALUES ("11", "27", "Miami");
INSERT INTO "employee" VALUES ("12", "26", "San Francisco");
INSERT INTO "employee" VALUES ("13", "32", "San Francisco");
INSERT INTO "employee" VALUES ("14", "24", "Boston");
INSERT INTO "employee" VALUES ("15", "25", "Boston");
INSERT INTO "evaluation" VALUES ("1", "2022");
INSERT INTO "evaluation" VALUES ("2", "2022");
INSERT INTO "evaluation" VALUES ("3", "2021");
INSERT INTO "evaluation" VALUES ("4", "2023");
INSERT INTO "evaluation" VALUES ("5", "2023");
INSERT INTO "evaluation" VALUES ("6", "2022");
INSERT INTO "evaluation" VALUES ("7", "2023");
INSERT INTO "evaluation" VALUES ("8", "2023");
INSERT INTO "evaluation" VALUES ("9", "2023");
INSERT INTO "evaluation" VALUES ("10", "2022");
INSERT INTO "evaluation" VALUES ("11", "2022");
INSERT INTO "evaluation" VALUES ("12", "2023");
INSERT INTO "evaluation" VALUES ("13", "2021");
INSERT INTO "evaluation" VALUES ("14", "2022");
INSERT INTO "evaluation" VALUES ("15", "2023");
INSERT INTO "shop" VALUES ("1", "New York");
INSERT INTO "shop" VALUES ("2", "Los Angeles");
INSERT INTO "shop" VALUES ("3", "Chicago");
INSERT INTO "shop" VALUES ("4", "Houston");
INSERT INTO "shop" VALUES ("5", "Miami");
INSERT INTO "shop" VALUES ("6", "San Francisco");
INSERT INTO "shop" VALUES ("7", "Boston");
INSERT INTO "hiring" VALUES ("1", "1");
INSERT INTO "hiring" VALUES ("1", "2");
INSERT INTO "hiring" VALUES ("1", "3");
INSERT INTO "hiring" VALUES ("2", "4");
INSERT INTO "hiring" VALUES ("2", "5");
INSERT INTO "hiring" VALUES ("3", "6");
INSERT INTO "hiring" VALUES ("4", "7");
INSERT INTO "hiring" VALUES ("4", "8");
INSERT INTO "hiring" VALUES ("4", "9");
INSERT INTO "hiring" VALUES ("5", "10");
INSERT INTO "hiring" VALUES ("5", "11");
INSERT INTO "hiring" VALUES ("6", "12");
INSERT INTO "hiring" VALUES ("6", "13");
INSERT INTO "hiring" VALUES ("7", "14");
INSERT INTO "hiring" VALUES ("7", "15");