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,
"Name" TEXT,
PRIMARY KEY ("Employee_ID")
);

CREATE TABLE "evaluation" (
"Employee_ID" TEXT,
"Year_awarded" TEXT,
"Bonus" FLOAT,
PRIMARY KEY ("Employee_ID", "Year_awarded")
);

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

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





INSERT INTO "employee" VALUES ("1", "Alice");
INSERT INTO "employee" VALUES ("2", "Bob");
INSERT INTO "employee" VALUES ("3", "Charlie");
INSERT INTO "employee" VALUES ("4", "David");
INSERT INTO "employee" VALUES ("5", "Eve");
INSERT INTO "employee" VALUES ("6", "Frank");
INSERT INTO "evaluation" VALUES ("1", "2022", "1000.0");
INSERT INTO "evaluation" VALUES ("2", "2022", "1200.0");
INSERT INTO "evaluation" VALUES ("3", "2023", "1500.0");
INSERT INTO "evaluation" VALUES ("4", "2023", "900.0");
INSERT INTO "evaluation" VALUES ("5", "2022", "1100.0");
INSERT INTO "shop" VALUES ("101", "Central Store", "Downtown");
INSERT INTO "shop" VALUES ("102", "Northside Mart", "North End");
INSERT INTO "shop" VALUES ("103", "Southside Emporium", "South End");
INSERT INTO "shop" VALUES ("104", "West End Market", "West End");
INSERT INTO "shop" VALUES ("105", "Eastside Grocer", "East End");
INSERT INTO "shop" VALUES ("106", "Empty Shop", "Nowhere");
INSERT INTO "shop" VALUES ("107", "Another Empty Shop", "Somewhere");
INSERT INTO "hiring" VALUES ("101", "1");
INSERT INTO "hiring" VALUES ("101", "2");
INSERT INTO "hiring" VALUES ("102", "3");
INSERT INTO "hiring" VALUES ("103", "4");
INSERT INTO "hiring" VALUES ("103", "5");
INSERT INTO "hiring" VALUES ("104", "6");