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"),
FOREIGN KEY ("Employee_ID") REFERENCES "employee"("Employee_ID")
);

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

CREATE TABLE "shop" (
"Shop_ID" INT,
"Manager_name" TEXT,
PRIMARY KEY ("Shop_ID")
);





INSERT INTO "employee" VALUES ("1", "Alice Smith");
INSERT INTO "employee" VALUES ("2", "Bob Johnson");
INSERT INTO "employee" VALUES ("3", "Charlie Brown");
INSERT INTO "employee" VALUES ("4", "Diana Prince");
INSERT INTO "employee" VALUES ("5", "Eve Adams");
INSERT INTO "employee" VALUES ("6", "Frank White");
INSERT INTO "employee" VALUES ("7", "Grace Lee");
INSERT INTO "evaluation" VALUES ("1", "2020", "1500.0");
INSERT INTO "evaluation" VALUES ("2", "2021", "2500.0");
INSERT INTO "evaluation" VALUES ("3", "2020", "1000.0");
INSERT INTO "evaluation" VALUES ("4", "2022", "3000.0");
INSERT INTO "evaluation" VALUES ("5", "2021", "2000.0");
INSERT INTO "evaluation" VALUES ("6", "2020", "500.0");
INSERT INTO "evaluation" VALUES ("7", "2022", "3000.0");
INSERT INTO "evaluation" VALUES ("1", "2021", "1200.0");
INSERT INTO "evaluation" VALUES ("2", "2020", "2000.0");
INSERT INTO "evaluation" VALUES ("4", "2021", "2800.0");
INSERT INTO "shop" VALUES ("101", "Manager A");
INSERT INTO "shop" VALUES ("102", "Manager B");
INSERT INTO "shop" VALUES ("103", "Manager C");
INSERT INTO "hiring" VALUES ("101", "1", "2019-01-15");
INSERT INTO "hiring" VALUES ("102", "2", "2018-03-20");
INSERT INTO "hiring" VALUES ("101", "3", "2020-06-01");
INSERT INTO "hiring" VALUES ("103", "4", "2017-11-10");
INSERT INTO "hiring" VALUES ("102", "5", "2019-09-05");
INSERT INTO "hiring" VALUES ("101", "6", "2021-02-28");
INSERT INTO "hiring" VALUES ("103", "7", "2018-07-12");