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





INSERT INTO "conductor" VALUES ("1", "Ludwig van Beethoven", "German");
INSERT INTO "conductor" VALUES ("2", "Leonard Bernstein", "American");
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 "orchestra" VALUES ("101", "1", "1800");
INSERT INTO "orchestra" VALUES ("102", "1", "1810");
INSERT INTO "orchestra" VALUES ("103", "1", "1820");
INSERT INTO "orchestra" VALUES ("104", "2", "1950");
INSERT INTO "orchestra" VALUES ("105", "2", "1960");
INSERT INTO "orchestra" VALUES ("106", "3", "2000");
INSERT INTO "orchestra" VALUES ("107", "4", "1980");
INSERT INTO "orchestra" VALUES ("108", "4", "1990");
INSERT INTO "orchestra" VALUES ("109", "5", "2010");
INSERT INTO "orchestra" VALUES ("110", "5", "2015");
INSERT INTO "orchestra" VALUES ("111", "5", "2020");
INSERT INTO "performance" VALUES ("201", "Symphony");
INSERT INTO "performance" VALUES ("202", "Concerto");
INSERT INTO "performance" VALUES ("203", "Opera");
INSERT INTO "performance" VALUES ("204", "Ballet");
INSERT INTO "performance" VALUES ("205", "Chamber Music");