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,
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");
INSERT INTO "employee" VALUES ("2");
INSERT INTO "employee" VALUES ("3");
INSERT INTO "employee" VALUES ("4");
INSERT INTO "employee" VALUES ("5");
INSERT INTO "employee" VALUES ("6");
INSERT INTO "employee" VALUES ("7");
INSERT INTO "employee" VALUES ("8");
INSERT INTO "employee" VALUES ("9");
INSERT INTO "employee" VALUES ("10");
INSERT INTO "shop" VALUES ("101", "Tech Haven", "Downtown");
INSERT INTO "shop" VALUES ("102", "Gadget World", "Uptown");
INSERT INTO "shop" VALUES ("103", "Device Depot", "Midtown");
INSERT INTO "shop" VALUES ("104", "ElectroMart", "Suburb");
INSERT INTO "shop" VALUES ("105", "Digital Hub", "City Center");
INSERT INTO "hiring" VALUES ("101", "1");
INSERT INTO "hiring" VALUES ("101", "2");
INSERT INTO "hiring" VALUES ("101", "3");
INSERT INTO "hiring" VALUES ("102", "4");
INSERT INTO "hiring" VALUES ("102", "5");
INSERT INTO "hiring" VALUES ("103", "6");
INSERT INTO "hiring" VALUES ("103", "7");
INSERT INTO "hiring" VALUES ("103", "8");
INSERT INTO "hiring" VALUES ("104", "9");
INSERT INTO "hiring" VALUES ("105", "10");
INSERT INTO "evaluation" VALUES ("1", "2022", "1500.00");
INSERT INTO "evaluation" VALUES ("2", "2022", "1200.00");
INSERT INTO "evaluation" VALUES ("3", "2022", "1300.00");
INSERT INTO "evaluation" VALUES ("4", "2022", "1100.00");
INSERT INTO "evaluation" VALUES ("5", "2022", "1150.00");
INSERT INTO "evaluation" VALUES ("6", "2022", "1400.00");
INSERT INTO "evaluation" VALUES ("7", "2022", "1250.00");
INSERT INTO "evaluation" VALUES ("8", "2022", "1350.00");
INSERT INTO "evaluation" VALUES ("9", "2022", "1000.00");
INSERT INTO "evaluation" VALUES ("10", "2022", "1600.00");
INSERT INTO "evaluation" VALUES ("1", "2023", "1550.00");
INSERT INTO "evaluation" VALUES ("2", "2023", "1250.00");
INSERT INTO "evaluation" VALUES ("3", "2023", "1350.00");
INSERT INTO "evaluation" VALUES ("4", "2023", "1150.00");
INSERT INTO "evaluation" VALUES ("5", "2023", "1200.00");
INSERT INTO "evaluation" VALUES ("6", "2023", "1450.00");
INSERT INTO "evaluation" VALUES ("7", "2023", "1300.00");
INSERT INTO "evaluation" VALUES ("8", "2023", "1400.00");
INSERT INTO "evaluation" VALUES ("9", "2023", "1050.00");
INSERT INTO "evaluation" VALUES ("10", "2023", "1650.00");