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,
"Name" TEXT,
"Nationality" TEXT,
PRIMARY KEY ("Conductor_ID")
);

CREATE TABLE "orchestra" (
"Orchestra_ID" INT UNIQUE,
"Orchestra" TEXT,
"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", "Leonard Bernstein", "American");
INSERT INTO "conductor" VALUES ("2", "Herbert von Karajan", "Austrian");
INSERT INTO "conductor" VALUES ("3", "Marin Alsop", "American");
INSERT INTO "conductor" VALUES ("4", "Simon Rattle", "British");
INSERT INTO "conductor" VALUES ("5", "Gustavo Dudamel", "Venezuelan");
INSERT INTO "conductor" VALUES ("6", "Valery Gergiev", "Russian");
INSERT INTO "orchestra" VALUES ("1", "New York Philharmonic", "1");
INSERT INTO "orchestra" VALUES ("2", "Berlin Philharmonic", "2");
INSERT INTO "orchestra" VALUES ("3", "Baltimore Symphony Orchestra", "3");
INSERT INTO "orchestra" VALUES ("4", "London Symphony Orchestra", "4");
INSERT INTO "orchestra" VALUES ("5", "Los Angeles Philharmonic", "1");
INSERT INTO "orchestra" VALUES ("6", "Vienna Philharmonic", "2");
INSERT INTO "orchestra" VALUES ("7", "Simón Bolívar Symphony Orchestra", "5");
INSERT INTO "orchestra" VALUES ("8", "Mariinsky Theatre Orchestra", "6");
INSERT INTO "orchestra" VALUES ("9", "City of Birmingham Symphony Orchestra", "4");
INSERT INTO "orchestra" VALUES ("10", "Orchestra of St. Luke's", "3");
INSERT INTO "performance" VALUES ("1", "1");
INSERT INTO "performance" VALUES ("2", "2");
INSERT INTO "performance" VALUES ("3", "3");
INSERT INTO "performance" VALUES ("4", "4");
INSERT INTO "performance" VALUES ("5", "5");
INSERT INTO "performance" VALUES ("6", "6");
INSERT INTO "performance" VALUES ("7", "7");
INSERT INTO "performance" VALUES ("8", "8");
INSERT INTO "performance" VALUES ("9", "9");
INSERT INTO "performance" VALUES ("10", "10");