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

CREATE TABLE "evaluation" (
"Employee_ID" TEXT,
"Year_awarded" TEXT,
PRIMARY KEY ("Employee_ID", "Year_awarded"),
FOREIGN KEY ("Employee_ID") REFERENCES "employee"("Employee_ID")
);

CREATE TABLE "hiring" (
"Employee_ID" INT,
"Start_from" TEXT,
PRIMARY KEY ("Employee_ID")
);

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





INSERT INTO "employee" VALUES ("1", "Alice Johnson", "34");
INSERT INTO "employee" VALUES ("2", "Bob Smith", "45");
INSERT INTO "employee" VALUES ("3", "Charlie Lee", "29");
INSERT INTO "employee" VALUES ("4", "Diana Prince", "40");
INSERT INTO "employee" VALUES ("5", "Ethan Hunt", "38");
INSERT INTO "employee" VALUES ("6", "Fiona Gallagher", "31");
INSERT INTO "employee" VALUES ("7", "George Martin", "50");
INSERT INTO "evaluation" VALUES ("1", "2018");
INSERT INTO "evaluation" VALUES ("1", "2019");
INSERT INTO "evaluation" VALUES ("1", "2020");
INSERT INTO "evaluation" VALUES ("2", "2017");
INSERT INTO "evaluation" VALUES ("2", "2018");
INSERT INTO "evaluation" VALUES ("3", "2019");
INSERT INTO "evaluation" VALUES ("3", "2020");
INSERT INTO "evaluation" VALUES ("3", "2021");
INSERT INTO "evaluation" VALUES ("3", "2022");
INSERT INTO "evaluation" VALUES ("4", "2018");
INSERT INTO "evaluation" VALUES ("5", "2019");
INSERT INTO "evaluation" VALUES ("5", "2020");
INSERT INTO "evaluation" VALUES ("5", "2021");
INSERT INTO "evaluation" VALUES ("6", "2020");
INSERT INTO "evaluation" VALUES ("7", "2017");
INSERT INTO "evaluation" VALUES ("7", "2018");
INSERT INTO "evaluation" VALUES ("7", "2019");
INSERT INTO "evaluation" VALUES ("7", "2020");
INSERT INTO "evaluation" VALUES ("7", "2021");
INSERT INTO "evaluation" VALUES ("7", "2022");
INSERT INTO "hiring" VALUES ("1", "2015-06-01");
INSERT INTO "hiring" VALUES ("2", "2010-03-15");
INSERT INTO "hiring" VALUES ("3", "2018-07-20");
INSERT INTO "hiring" VALUES ("4", "2012-11-05");
INSERT INTO "hiring" VALUES ("5", "2016-01-10");
INSERT INTO "hiring" VALUES ("6", "2019-09-30");
INSERT INTO "hiring" VALUES ("7", "2008-05-22");
INSERT INTO "shop" VALUES ("101", "Alice Johnson");
INSERT INTO "shop" VALUES ("102", "Bob Smith");
INSERT INTO "shop" VALUES ("103", "Diana Prince");
INSERT INTO "shop" VALUES ("104", "George Martin");