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 ("Singer_ID") REFERENCES "singer"("Singer_ID")
);

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





INSERT INTO "concert" VALUES ("1", "2014");
INSERT INTO "concert" VALUES ("2", "2015");
INSERT INTO "concert" VALUES ("3", "2013");
INSERT INTO "concert" VALUES ("4", "2014");
INSERT INTO "concert" VALUES ("5", "2016");
INSERT INTO "concert" VALUES ("6", "2015");
INSERT INTO "concert" VALUES ("7", "2012");
INSERT INTO "concert" VALUES ("8", "2015");
INSERT INTO "concert" VALUES ("9", "2014");
INSERT INTO "concert" VALUES ("10", "2017");
INSERT INTO "singer" VALUES ("101", "2014");
INSERT INTO "singer" VALUES ("102", "2015");
INSERT INTO "singer" VALUES ("103", "2013");
INSERT INTO "singer" VALUES ("104", "2014");
INSERT INTO "singer" VALUES ("105", "2016");
INSERT INTO "singer" VALUES ("106", "2015");
INSERT INTO "singer" VALUES ("107", "2012");
INSERT INTO "singer" VALUES ("108", "2015");
INSERT INTO "singer" VALUES ("109", "2014");
INSERT INTO "singer" VALUES ("110", "2017");
INSERT INTO "singer_in_concert" VALUES ("1", "101");
INSERT INTO "singer_in_concert" VALUES ("1", "102");
INSERT INTO "singer_in_concert" VALUES ("2", "103");
INSERT INTO "singer_in_concert" VALUES ("2", "104");
INSERT INTO "singer_in_concert" VALUES ("3", "105");
INSERT INTO "singer_in_concert" VALUES ("4", "106");
INSERT INTO "singer_in_concert" VALUES ("4", "107");
INSERT INTO "singer_in_concert" VALUES ("5", "108");
INSERT INTO "singer_in_concert" VALUES ("6", "109");
INSERT INTO "singer_in_concert" VALUES ("6", "110");
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 ("9", "104");
INSERT INTO "singer_in_concert" VALUES ("10", "105");
INSERT INTO "stadium" VALUES ("201", "Stadium A");
INSERT INTO "stadium" VALUES ("202", "Stadium B");
INSERT INTO "stadium" VALUES ("203", "Stadium C");
INSERT INTO "stadium" VALUES ("204", "Stadium D");
INSERT INTO "stadium" VALUES ("205", "Stadium E");