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 "shop" VALUES ("1", "Green Grocers", "Downtown");
INSERT INTO "shop" VALUES ("2", "Tech Hub", "Uptown");
INSERT INTO "shop" VALUES ("3", "Book Nook", "Midtown");
INSERT INTO "shop" VALUES ("4", "Fashion Point", "Suburb");
INSERT INTO "shop" VALUES ("5", "Gadget World", "Downtown");
INSERT INTO "shop" VALUES ("6", "Toy Land", "Uptown");
INSERT INTO "shop" VALUES ("7", "Pet Paradise", "Midtown");
INSERT INTO "shop" VALUES ("8", "Coffee Corner", "Suburb");
INSERT INTO "shop" VALUES ("9", "Sports Central", "Downtown");
INSERT INTO "shop" VALUES ("10", "Art Studio", "Uptown");
INSERT INTO "employee" VALUES ("101");
INSERT INTO "employee" VALUES ("102");
INSERT INTO "employee" VALUES ("103");
INSERT INTO "employee" VALUES ("104");
INSERT INTO "employee" VALUES ("105");
INSERT INTO "employee" VALUES ("106");
INSERT INTO "employee" VALUES ("107");
INSERT INTO "employee" VALUES ("108");
INSERT INTO "hiring" VALUES ("1", "101");
INSERT INTO "hiring" VALUES ("2", "102");
INSERT INTO "hiring" VALUES ("2", "103");
INSERT INTO "hiring" VALUES ("3", "104");
INSERT INTO "hiring" VALUES ("5", "105");
INSERT INTO "hiring" VALUES ("7", "106");
INSERT INTO "hiring" VALUES ("9", "107");
INSERT INTO "hiring" VALUES ("9", "108");
INSERT INTO "evaluation" VALUES ("101", "2022", "1500.00");
INSERT INTO "evaluation" VALUES ("102", "2021", "1200.00");
INSERT INTO "evaluation" VALUES ("103", "2022", "1300.00");
INSERT INTO "evaluation" VALUES ("104", "2023", "1100.00");
INSERT INTO "evaluation" VALUES ("105", "2023", "1400.00");
INSERT INTO "evaluation" VALUES ("106", "2021", "1250.00");
INSERT INTO "evaluation" VALUES ("107", "2022", "1350.00");
INSERT INTO "evaluation" VALUES ("108", "2023", "1450.00");