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", "Los Angeles");
INSERT INTO "employee" VALUES ("4", "22", "Chicago");
INSERT INTO "employee" VALUES ("5", "29", "Chicago");
INSERT INTO "employee" VALUES ("6", "27", "New York");
INSERT INTO "employee" VALUES ("7", "30", "Houston");
INSERT INTO "employee" VALUES ("8", "26", "Miami");
INSERT INTO "employee" VALUES ("9", "24", "Miami");
INSERT INTO "employee" VALUES ("10", "40", "Los Angeles");
INSERT INTO "evaluation" VALUES ("1", "2020");
INSERT INTO "evaluation" VALUES ("2", "2021");
INSERT INTO "evaluation" VALUES ("3", "2019");
INSERT INTO "evaluation" VALUES ("4", "2022");
INSERT INTO "evaluation" VALUES ("5", "2020");
INSERT INTO "evaluation" VALUES ("6", "2021");
INSERT INTO "evaluation" VALUES ("7", "2019");
INSERT INTO "evaluation" VALUES ("8", "2022");
INSERT INTO "evaluation" VALUES ("9", "2020");
INSERT INTO "evaluation" VALUES ("10", "2021");
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 "hiring" VALUES ("1", "1");
INSERT INTO "hiring" VALUES ("1", "2");
INSERT INTO "hiring" VALUES ("2", "3");
INSERT INTO "hiring" VALUES ("3", "4");
INSERT INTO "hiring" VALUES ("3", "5");
INSERT INTO "hiring" VALUES ("1", "6");
INSERT INTO "hiring" VALUES ("4", "7");
INSERT INTO "hiring" VALUES ("5", "8");
INSERT INTO "hiring" VALUES ("5", "9");
INSERT INTO "hiring" VALUES ("2", "10");