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,
"Stadium_ID" TEXT,
"Year" TEXT,
PRIMARY KEY ("concert_ID"),
FOREIGN KEY ("Stadium_ID") REFERENCES "stadium"("Stadium_ID")
);

CREATE TABLE "singer" (
"Singer_ID" INT,
"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 ("Singer_ID") REFERENCES "singer"("Singer_ID")
);

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





INSERT INTO "stadium" VALUES ("1", "London", "Wembley Stadium");
INSERT INTO "stadium" VALUES ("2", "Manchester", "Old Trafford");
INSERT INTO "stadium" VALUES ("3", "Liverpool", "Anfield");
INSERT INTO "stadium" VALUES ("4", "Birmingham", "Villa Park");
INSERT INTO "stadium" VALUES ("5", "Glasgow", "Hampden Park");
INSERT INTO "stadium" VALUES ("6", "Cardiff", "Principality Stadium");
INSERT INTO "stadium" VALUES ("7", "Dublin", "Croke Park");
INSERT INTO "stadium" VALUES ("8", "Edinburgh", "Murrayfield Stadium");
INSERT INTO "singer" VALUES ("1", "Ed Sheeran");
INSERT INTO "singer" VALUES ("2", "Adele");
INSERT INTO "singer" VALUES ("3", "Coldplay");
INSERT INTO "singer" VALUES ("4", "Taylor Swift");
INSERT INTO "singer" VALUES ("5", "Beyonce");
INSERT INTO "singer" VALUES ("6", "U2");
INSERT INTO "singer" VALUES ("7", "Rihanna");
INSERT INTO "singer" VALUES ("8", "Justin Bieber");
INSERT INTO "concert" VALUES ("1", "Summer Fest", "1", "2014");
INSERT INTO "concert" VALUES ("2", "Winter Gala", "2", "2014");
INSERT INTO "concert" VALUES ("3", "Spring Jam", "1", "2015");
INSERT INTO "concert" VALUES ("4", "Autumn Rocks", "3", "2014");
INSERT INTO "concert" VALUES ("5", "New Year's Eve Bash", "3", "2015");
INSERT INTO "concert" VALUES ("6", "Global Tour", "4", "2014");
INSERT INTO "concert" VALUES ("7", "Music Marathon", "4", "2015");
INSERT INTO "concert" VALUES ("8", "Charity Concert", "5", "2014");
INSERT INTO "concert" VALUES ("9", "Stadium Show", "6", "2015");
INSERT INTO "concert" VALUES ("10", "Rock Fest", "7", "2014");
INSERT INTO "concert" VALUES ("11", "Pop Extravaganza", "8", "2015");
INSERT INTO "concert" VALUES ("12", "One-off Gig", "1", "2016");
INSERT INTO "concert" VALUES ("13", "Special Event", "2", "2013");
INSERT INTO "concert" VALUES ("14", "Anniversary Concert", "5", "2015");
INSERT INTO "concert" VALUES ("15", "Festival of Lights", "8", "2014");
INSERT INTO "singer_in_concert" VALUES ("1", "1");
INSERT INTO "singer_in_concert" VALUES ("1", "2");
INSERT INTO "singer_in_concert" VALUES ("2", "3");
INSERT INTO "singer_in_concert" VALUES ("3", "1");
INSERT INTO "singer_in_concert" VALUES ("3", "4");
INSERT INTO "singer_in_concert" VALUES ("4", "5");
INSERT INTO "singer_in_concert" VALUES ("5", "6");
INSERT INTO "singer_in_concert" VALUES ("6", "7");
INSERT INTO "singer_in_concert" VALUES ("7", "8");
INSERT INTO "singer_in_concert" VALUES ("8", "1");
INSERT INTO "singer_in_concert" VALUES ("9", "2");
INSERT INTO "singer_in_concert" VALUES ("10", "3");
INSERT INTO "singer_in_concert" VALUES ("11", "4");
INSERT INTO "singer_in_concert" VALUES ("12", "5");
INSERT INTO "singer_in_concert" VALUES ("13", "6");
INSERT INTO "singer_in_concert" VALUES ("14", "7");
INSERT INTO "singer_in_concert" VALUES ("15", "8");