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

CREATE TABLE "orchestra" (
"Orchestra_ID" INT UNIQUE,
"Orchestra" TEXT,
PRIMARY KEY ("Orchestra_ID")
);

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





INSERT INTO "conductor" VALUES ("1", "Gustavo Dudamel");
INSERT INTO "conductor" VALUES ("2", "Simon Rattle");
INSERT INTO "conductor" VALUES ("3", "Marin Alsop");
INSERT INTO "conductor" VALUES ("4", "Yannick Nézet-Séguin");
INSERT INTO "conductor" VALUES ("5", "Mirga Gražinytė-Tyla");
INSERT INTO "orchestra" VALUES ("1", "Berlin Philharmonic");
INSERT INTO "orchestra" VALUES ("2", "Vienna Philharmonic");
INSERT INTO "orchestra" VALUES ("3", "London Symphony Orchestra");
INSERT INTO "orchestra" VALUES ("4", "New York Philharmonic");
INSERT INTO "orchestra" VALUES ("5", "Royal Concertgebouw Orchestra");
INSERT INTO "orchestra" VALUES ("6", "Boston Symphony Orchestra");
INSERT INTO "orchestra" VALUES ("7", "Chicago Symphony Orchestra");
INSERT INTO "orchestra" VALUES ("8", "San Francisco Symphony");
INSERT INTO "orchestra" VALUES ("9", "Los Angeles Philharmonic");
INSERT INTO "orchestra" VALUES ("10", "Cleveland Orchestra");
INSERT INTO "performance" VALUES ("1", "1", "Concert", "2023-10-26");
INSERT INTO "performance" VALUES ("2", "2", "Opera", "2023-11-15");
INSERT INTO "performance" VALUES ("3", "3", "Concert", "2023-09-01");
INSERT INTO "performance" VALUES ("4", "4", "Chamber", "2023-12-05");
INSERT INTO "performance" VALUES ("5", "1", "Concert", "2023-08-10");
INSERT INTO "performance" VALUES ("6", "2", "Concert", "2023-07-20");
INSERT INTO "performance" VALUES ("7", "3", "Opera", "2023-06-18");
INSERT INTO "performance" VALUES ("8", "4", "Concert", "2023-05-25");
INSERT INTO "performance" VALUES ("9", "5", "Concert", "2023-04-12");
INSERT INTO "performance" VALUES ("10", "9", "Concert", "2023-03-01");
INSERT INTO "performance" VALUES ("11", "10", "Concert", "2023-02-14");