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,
"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 "shop" VALUES ("1", "Tech Haven", "Downtown");
INSERT INTO "shop" VALUES ("2", "Gadget World", "Uptown");
INSERT INTO "shop" VALUES ("3", "Device Depot", "Midtown");
INSERT INTO "shop" VALUES ("4", "Electro Mart", "Suburb");
INSERT INTO "shop" VALUES ("5", "Widget Warehouse", "Industrial Park");
INSERT INTO "employee" VALUES ("101", "Alice Johnson");
INSERT INTO "employee" VALUES ("102", "Bob Smith");
INSERT INTO "employee" VALUES ("103", "Charlie Lee");
INSERT INTO "employee" VALUES ("104", "Diana Prince");
INSERT INTO "hiring" VALUES ("1", "101");
INSERT INTO "hiring" VALUES ("1", "102");
INSERT INTO "hiring" VALUES ("2", "103");
INSERT INTO "hiring" VALUES ("4", "104");
INSERT INTO "evaluation" VALUES ("101", "2022", "1500.00");
INSERT INTO "evaluation" VALUES ("102", "2022", "1200.00");
INSERT INTO "evaluation" VALUES ("103", "2022", "1300.00");
INSERT INTO "evaluation" VALUES ("104", "2022", "1400.00");