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,
"concert_Name" 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", "Summer Fest", "2014");
INSERT INTO "concert" VALUES ("2", "Winter Gala", "2014");
INSERT INTO "concert" VALUES ("3", "Spring Jam", "2015");
INSERT INTO "concert" VALUES ("4", "Autumn Beats", "2014");
INSERT INTO "concert" VALUES ("5", "New Year Bash", "2016");
INSERT INTO "concert" VALUES ("6", "Rock Revival", "2014");
INSERT INTO "concert" VALUES ("7", "Pop Explosion", "2015");
INSERT INTO "singer" VALUES ("101", "Adele", "Rolling in the Deep");
INSERT INTO "singer" VALUES ("102", "Ed Sheeran", "Shape of You");
INSERT INTO "singer" VALUES ("103", "Taylor Swift", "Blank Space");
INSERT INTO "singer" VALUES ("104", "Beyonce", "Single Ladies");
INSERT INTO "singer" VALUES ("105", "Bruno Mars", "Uptown Funk");
INSERT INTO "singer" VALUES ("106", "Rihanna", "Umbrella");
INSERT INTO "singer" VALUES ("107", "Justin Bieber", "Baby");
INSERT INTO "singer" VALUES ("108", "Lady Gaga", "Bad Romance");
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", "101");
INSERT INTO "singer_in_concert" VALUES ("4", "106");
INSERT INTO "singer_in_concert" VALUES ("6", "102");
INSERT INTO "singer_in_concert" VALUES ("6", "107");
INSERT INTO "singer_in_concert" VALUES ("7", "108");
INSERT INTO "stadium" VALUES ("1", "Wembley Stadium");
INSERT INTO "stadium" VALUES ("2", "Madison Square Garden");
INSERT INTO "stadium" VALUES ("3", "Staples Center");
INSERT INTO "stadium" VALUES ("4", "O2 Arena");
INSERT INTO "stadium" VALUES ("5", "Sydney Opera House");