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,
"Start_from" TEXT,
"Is_full_time" BOOLEAN,
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,
"Location" TEXT,
PRIMARY KEY ("Shop_ID")
);





INSERT INTO "employee" VALUES ("1", "Alice Johnson");
INSERT INTO "employee" VALUES ("2", "Bob Smith");
INSERT INTO "employee" VALUES ("3", "Charlie Lee");
INSERT INTO "employee" VALUES ("4", "Diana Prince");
INSERT INTO "employee" VALUES ("5", "Ethan Hunt");
INSERT INTO "employee" VALUES ("6", "Fiona Gallagher");
INSERT INTO "employee" VALUES ("7", "George Martin");
INSERT INTO "employee" VALUES ("8", "Hannah Baker");
INSERT INTO "employee" VALUES ("9", "Ian Curtis");
INSERT INTO "employee" VALUES ("10", "Julia Roberts");
INSERT INTO "shop" VALUES ("101", "New York");
INSERT INTO "shop" VALUES ("102", "Los Angeles");
INSERT INTO "shop" VALUES ("103", "Chicago");
INSERT INTO "shop" VALUES ("104", "Houston");
INSERT INTO "shop" VALUES ("105", "Phoenix");
INSERT INTO "hiring" VALUES ("101", "1", "2018-06-01", "1");
INSERT INTO "hiring" VALUES ("102", "2", "2019-01-15", "0");
INSERT INTO "hiring" VALUES ("103", "3", "2020-03-20", "1");
INSERT INTO "hiring" VALUES ("101", "4", "2017-11-30", "1");
INSERT INTO "hiring" VALUES ("104", "5", "2021-07-10", "0");
INSERT INTO "hiring" VALUES ("105", "6", "2019-09-05", "1");
INSERT INTO "hiring" VALUES ("102", "7", "2020-12-01", "0");
INSERT INTO "hiring" VALUES ("103", "8", "2018-04-22", "1");
INSERT INTO "hiring" VALUES ("104", "9", "2021-01-01", "0");
INSERT INTO "hiring" VALUES ("105", "10", "2017-05-15", "1");
INSERT INTO "evaluation" VALUES ("1", "2018", "1500.00");
INSERT INTO "evaluation" VALUES ("1", "2019", "1600.00");
INSERT INTO "evaluation" VALUES ("2", "2019", "1200.00");
INSERT INTO "evaluation" VALUES ("3", "2020", "1800.00");
INSERT INTO "evaluation" VALUES ("4", "2017", "1300.00");
INSERT INTO "evaluation" VALUES ("5", "2021", "1100.00");
INSERT INTO "evaluation" VALUES ("6", "2019", "1700.00");
INSERT INTO "evaluation" VALUES ("7", "2020", "1250.00");
INSERT INTO "evaluation" VALUES ("8", "2018", "1400.00");
INSERT INTO "evaluation" VALUES ("9", "2021", "1150.00");
INSERT INTO "evaluation" VALUES ("10", "2017", "1550.00");