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,
"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,
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", "Riccardo Muti", "Italian");
INSERT INTO "conductor" VALUES ("5", "Gustavo Dudamel", "Venezuelan");
INSERT INTO "conductor" VALUES ("6", "Valery Gergiev", "Russian");
INSERT INTO "conductor" VALUES ("7", "Clara Schumann", "German");
INSERT INTO "orchestra" VALUES ("101", "New York Philharmonic", "1", "1842");
INSERT INTO "orchestra" VALUES ("102", "Berlin Philharmonic", "2", "1882");
INSERT INTO "orchestra" VALUES ("103", "Baltimore Symphony Orchestra", "3", "1916");
INSERT INTO "orchestra" VALUES ("104", "Chicago Symphony Orchestra", "4", "1891");
INSERT INTO "orchestra" VALUES ("105", "Simón Bolívar Symphony Orchestra", "5", "1978");
INSERT INTO "orchestra" VALUES ("106", "Mariinsky Theatre Orchestra", "6", "1783");
INSERT INTO "orchestra" VALUES ("107", "Vienna Philharmonic", "2", "1842");
INSERT INTO "orchestra" VALUES ("108", "Los Angeles Philharmonic", "3", "1919");
INSERT INTO "orchestra" VALUES ("109", "Orchestra of the Age of Enlightenment", "7", "1986");
INSERT INTO "orchestra" VALUES ("110", "London Symphony Orchestra", "4", "1904");
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");