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,
"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", "USA");
INSERT INTO "conductor" VALUES ("2", "Gustavo Dudamel", "Venezuela");
INSERT INTO "conductor" VALUES ("3", "Marin Alsop", "USA");
INSERT INTO "conductor" VALUES ("4", "Simon Rattle", "UK");
INSERT INTO "conductor" VALUES ("5", "Zubin Mehta", "India");
INSERT INTO "conductor" VALUES ("6", "Valery Gergiev", "Russia");
INSERT INTO "conductor" VALUES ("7", "Seiji Ozawa", "Japan");
INSERT INTO "conductor" VALUES ("8", "Riccardo Muti", "Italy");
INSERT INTO "conductor" VALUES ("9", "Daniel Barenboim", "Argentina");
INSERT INTO "conductor" VALUES ("10", "Esa-Pekka Salonen", "Finland");
INSERT INTO "orchestra" VALUES ("101", "New York Philharmonic", "1");
INSERT INTO "orchestra" VALUES ("102", "Los Angeles Philharmonic", "2");
INSERT INTO "orchestra" VALUES ("103", "Baltimore Symphony Orchestra", "3");
INSERT INTO "orchestra" VALUES ("104", "London Symphony Orchestra", "4");
INSERT INTO "orchestra" VALUES ("105", "Israel Philharmonic Orchestra", "5");
INSERT INTO "orchestra" VALUES ("106", "Mariinsky Orchestra", "6");
INSERT INTO "orchestra" VALUES ("107", "Boston Symphony Orchestra", "7");
INSERT INTO "orchestra" VALUES ("108", "Chicago Symphony Orchestra", "8");
INSERT INTO "orchestra" VALUES ("109", "Staatskapelle Berlin", "9");
INSERT INTO "orchestra" VALUES ("110", "San Francisco Symphony", "10");
INSERT INTO "orchestra" VALUES ("111", "Vienna Philharmonic", "8");
INSERT INTO "orchestra" VALUES ("112", "Berlin Philharmonic", "4");
INSERT INTO "performance" VALUES ("1001", "101");
INSERT INTO "performance" VALUES ("1002", "102");
INSERT INTO "performance" VALUES ("1003", "103");
INSERT INTO "performance" VALUES ("1004", "104");
INSERT INTO "performance" VALUES ("1005", "105");
INSERT INTO "performance" VALUES ("1006", "106");
INSERT INTO "performance" VALUES ("1007", "107");
INSERT INTO "performance" VALUES ("1008", "108");
INSERT INTO "performance" VALUES ("1009", "109");
INSERT INTO "performance" VALUES ("1010", "110");
INSERT INTO "performance" VALUES ("1011", "104");
INSERT INTO "performance" VALUES ("1012", "102");
INSERT INTO "performance" VALUES ("1013", "111");
INSERT INTO "performance" VALUES ("1014", "112");