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

CREATE TABLE "singer" (
"Singer_ID" INT UNIQUE,
"Name" TEXT,
"Song_Name" 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"),
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", "Rock Night", "2014");
INSERT INTO "concert" VALUES ("2", "Jazz Evening", "2015");
INSERT INTO "concert" VALUES ("3", "Pop Festival", "2014");
INSERT INTO "concert" VALUES ("4", "Classical Gala", "2016");
INSERT INTO "concert" VALUES ("5", "Indie Vibes", "2013");
INSERT INTO "concert" VALUES ("6", "Electronic Dance", "2014");
INSERT INTO "concert" VALUES ("7", "Country Roads", "2017");
INSERT INTO "singer" VALUES ("101", "Alice Blue", "Sky High");
INSERT INTO "singer" VALUES ("102", "Bob Green", "Jazz it Up");
INSERT INTO "singer" VALUES ("103", "Cathy Red", "Pop Star");
INSERT INTO "singer" VALUES ("104", "David Yellow", "Classical Dreams");
INSERT INTO "singer" VALUES ("105", "Eva Purple", "Indie Heart");
INSERT INTO "singer" VALUES ("106", "Frank Orange", "Dance All Night");
INSERT INTO "singer" VALUES ("107", "Grace Pink", "Country Roads");
INSERT INTO "singer_in_concert" VALUES ("1", "101");
INSERT INTO "singer_in_concert" VALUES ("1", "103");
INSERT INTO "singer_in_concert" VALUES ("3", "103");
INSERT INTO "singer_in_concert" VALUES ("3", "106");
INSERT INTO "singer_in_concert" VALUES ("6", "106");
INSERT INTO "singer_in_concert" VALUES ("2", "102");
INSERT INTO "singer_in_concert" VALUES ("4", "104");
INSERT INTO "singer_in_concert" VALUES ("5", "105");
INSERT INTO "singer_in_concert" VALUES ("7", "107");
INSERT INTO "stadium" VALUES ("201", "Grand Arena");
INSERT INTO "stadium" VALUES ("202", "City Hall");
INSERT INTO "stadium" VALUES ("203", "Open Air Theatre");
INSERT INTO "stadium" VALUES ("204", "Downtown Club");
INSERT INTO "stadium" VALUES ("205", "Riverfront Stage");