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,
PRIMARY KEY ("Orchestra_ID"),
FOREIGN KEY ("Conductor_ID") REFERENCES "conductor"("Conductor_ID")
);

CREATE TABLE "performance" (
"Performance_ID" INT,
"Orchestra_ID" INT,
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 "conductor" VALUES ("6");
INSERT INTO "orchestra" VALUES ("101", "1");
INSERT INTO "orchestra" VALUES ("102", "2");
INSERT INTO "orchestra" VALUES ("103", "3");
INSERT INTO "orchestra" VALUES ("104", "1");
INSERT INTO "orchestra" VALUES ("105", "4");
INSERT INTO "orchestra" VALUES ("106", "5");
INSERT INTO "performance" VALUES ("1001", "101");
INSERT INTO "performance" VALUES ("1002", "102");
INSERT INTO "performance" VALUES ("1003", "101");
INSERT INTO "performance" VALUES ("1004", "103");
INSERT INTO "performance" VALUES ("1005", "104");
INSERT INTO "performance" VALUES ("1006", "105");
INSERT INTO "performance" VALUES ("1007", "102");