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 "conductor" (
"Conductor_ID" INT UNIQUE,
PRIMARY KEY ("Conductor_ID")
);

CREATE TABLE "orchestra" (
"Orchestra_ID" INT UNIQUE,
"Conductor_ID" INT,
"Year_of_Founded" FLOAT,
PRIMARY KEY ("Orchestra_ID"),
FOREIGN KEY ("Conductor_ID") REFERENCES "conductor"("Conductor_ID")
);

CREATE TABLE "performance" (
"Performance_ID" INT,
"Orchestra_ID" INT,
"Date" TEXT,
PRIMARY KEY ("Performance_ID"),
FOREIGN KEY ("Orchestra_ID") REFERENCES "orchestra"("Orchestra_ID")
);





INSERT INTO "conductor" VALUES ("1");
INSERT INTO "conductor" VALUES ("2");
INSERT INTO "conductor" VALUES ("3");
INSERT INTO "conductor" VALUES ("4");
INSERT INTO "conductor" VALUES ("5");
INSERT INTO "orchestra" VALUES ("101", "1", "1980");
INSERT INTO "orchestra" VALUES ("102", "2", "1995");
INSERT INTO "orchestra" VALUES ("103", "3", "2000");
INSERT INTO "orchestra" VALUES ("104", "4", "1975");
INSERT INTO "orchestra" VALUES ("105", "5", "2010");
INSERT INTO "orchestra" VALUES ("106", "1", "1990");
INSERT INTO "orchestra" VALUES ("107", "2", "2005");
INSERT INTO "performance" VALUES ("1", "101", "2023-01-15");
INSERT INTO "performance" VALUES ("2", "101", "2023-02-20");
INSERT INTO "performance" VALUES ("3", "101", "2023-03-25");
INSERT INTO "performance" VALUES ("4", "102", "2023-04-10");
INSERT INTO "performance" VALUES ("5", "102", "2023-05-05");
INSERT INTO "performance" VALUES ("6", "103", "2023-06-01");
INSERT INTO "performance" VALUES ("7", "104", "2023-07-12");
INSERT INTO "performance" VALUES ("8", "105", "2023-08-18");
INSERT INTO "performance" VALUES ("9", "106", "2023-09-01");
INSERT INTO "performance" VALUES ("10", "106", "2023-09-15");
INSERT INTO "performance" VALUES ("11", "107", "2023-10-01");
INSERT INTO "performance" VALUES ("12", "107", "2023-10-10");
INSERT INTO "performance" VALUES ("13", "107", "2023-10-20");
INSERT INTO "performance" VALUES ("14", "103", "2023-11-01");