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

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

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





INSERT INTO "stadium" VALUES ("1", "New York", "Madison Square Garden");
INSERT INTO "stadium" VALUES ("2", "Los Angeles", "Staples Center");
INSERT INTO "stadium" VALUES ("3", "Chicago", "United Center");
INSERT INTO "stadium" VALUES ("4", "Houston", "Toyota Center");
INSERT INTO "stadium" VALUES ("5", "Miami", "American Airlines Arena");
INSERT INTO "stadium" VALUES ("6", "San Francisco", "Chase Center");
INSERT INTO "stadium" VALUES ("7", "Boston", "TD Garden");
INSERT INTO "concert" VALUES ("1", "Rock Night", "1", "2013");
INSERT INTO "concert" VALUES ("2", "Jazz Evening", "2", "2014");
INSERT INTO "concert" VALUES ("3", "Pop Festival", "3", "2015");
INSERT INTO "concert" VALUES ("4", "Classical Gala", "4", "2016");
INSERT INTO "concert" VALUES ("5", "Indie Vibes", "2", "2015");
INSERT INTO "concert" VALUES ("6", "Hip Hop Bash", "5", "2013");
INSERT INTO "concert" VALUES ("7", "Country Fest", "6", "2016");
INSERT INTO "concert" VALUES ("8", "Electronic Night", "7", "2017");
INSERT INTO "singer_in_concert" VALUES ("1", "S1");
INSERT INTO "singer_in_concert" VALUES ("2", "S2");
INSERT INTO "singer_in_concert" VALUES ("3", "S3");
INSERT INTO "singer_in_concert" VALUES ("4", "S4");
INSERT INTO "singer_in_concert" VALUES ("5", "S5");
INSERT INTO "singer_in_concert" VALUES ("6", "S6");
INSERT INTO "singer_in_concert" VALUES ("7", "S7");
INSERT INTO "singer_in_concert" VALUES ("8", "S8");