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 "concert" (
"concert_ID" INT UNIQUE,
"Year" TEXT,
PRIMARY KEY ("concert_ID")
);

CREATE TABLE "singer" (
"Singer_ID" INT,
"Song_release_year" TEXT,
PRIMARY KEY ("Singer_ID")
);

CREATE TABLE "singer_in_concert" (
"concert_ID" INT,
"Singer_ID" TEXT,
PRIMARY KEY ("concert_ID", "Singer_ID"),
FOREIGN KEY ("concert_ID") REFERENCES "concert"("concert_ID")
);

CREATE TABLE "stadium" (
"Stadium_ID" INT,
"Location" TEXT,
PRIMARY KEY ("Stadium_ID")
);





INSERT INTO "concert" VALUES ("1", "2018");
INSERT INTO "concert" VALUES ("2", "2019");
INSERT INTO "concert" VALUES ("3", "2019");
INSERT INTO "concert" VALUES ("4", "2020");
INSERT INTO "concert" VALUES ("5", "2020");
INSERT INTO "concert" VALUES ("6", "2020");
INSERT INTO "concert" VALUES ("7", "2021");
INSERT INTO "concert" VALUES ("8", "2021");
INSERT INTO "concert" VALUES ("9", "2021");
INSERT INTO "concert" VALUES ("10", "2021");
INSERT INTO "singer" VALUES ("101", "2017");
INSERT INTO "singer" VALUES ("102", "2018");
INSERT INTO "singer" VALUES ("103", "2019");
INSERT INTO "singer" VALUES ("104", "2020");
INSERT INTO "singer" VALUES ("105", "2021");
INSERT INTO "singer" VALUES ("106", "2021");
INSERT INTO "singer_in_concert" VALUES ("1", "101");
INSERT INTO "singer_in_concert" VALUES ("2", "102");
INSERT INTO "singer_in_concert" VALUES ("3", "103");
INSERT INTO "singer_in_concert" VALUES ("4", "104");
INSERT INTO "singer_in_concert" VALUES ("5", "105");
INSERT INTO "singer_in_concert" VALUES ("6", "106");
INSERT INTO "singer_in_concert" VALUES ("7", "101");
INSERT INTO "singer_in_concert" VALUES ("8", "102");
INSERT INTO "singer_in_concert" VALUES ("9", "103");
INSERT INTO "singer_in_concert" VALUES ("10", "104");
INSERT INTO "stadium" VALUES ("201", "New York");
INSERT INTO "stadium" VALUES ("202", "Los Angeles");
INSERT INTO "stadium" VALUES ("203", "Chicago");
INSERT INTO "stadium" VALUES ("204", "Houston");
INSERT INTO "stadium" VALUES ("205", "Phoenix");