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,
"concert_Name" 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");
INSERT INTO "concert" VALUES ("2", "Winter Gala");
INSERT INTO "concert" VALUES ("3", "Spring Jam");
INSERT INTO "concert" VALUES ("4", "Autumn Beats");
INSERT INTO "concert" VALUES ("5", "New Year Bash");
INSERT INTO "singer" VALUES ("101", "Alice Johnson", "Sunshine");
INSERT INTO "singer" VALUES ("102", "Bob Smith", "Moonlight");
INSERT INTO "singer" VALUES ("103", "Cathy Lee", "Starlight");
INSERT INTO "singer" VALUES ("104", "David Kim", "Raindrops");
INSERT INTO "singer" VALUES ("105", "Eva Green", "Firefly");
INSERT INTO "singer" VALUES ("106", "Frank Moore", "Thunder");
INSERT INTO "singer" VALUES ("107", "Grace Park", "Breeze");
INSERT INTO "singer_in_concert" VALUES ("1", "101");
INSERT INTO "singer_in_concert" VALUES ("1", "102");
INSERT INTO "singer_in_concert" VALUES ("1", "103");
INSERT INTO "singer_in_concert" VALUES ("2", "101");
INSERT INTO "singer_in_concert" VALUES ("2", "104");
INSERT INTO "singer_in_concert" VALUES ("3", "105");
INSERT INTO "singer_in_concert" VALUES ("3", "106");
INSERT INTO "singer_in_concert" VALUES ("3", "107");
INSERT INTO "singer_in_concert" VALUES ("4", "101");
INSERT INTO "singer_in_concert" VALUES ("4", "102");
INSERT INTO "singer_in_concert" VALUES ("4", "105");
INSERT INTO "singer_in_concert" VALUES ("5", "103");
INSERT INTO "singer_in_concert" VALUES ("5", "104");
INSERT INTO "singer_in_concert" VALUES ("5", "106");
INSERT INTO "stadium" VALUES ("201", "Grand Arena");
INSERT INTO "stadium" VALUES ("202", "City Dome");
INSERT INTO "stadium" VALUES ("203", "Open Air Park");
INSERT INTO "stadium" VALUES ("204", "Downtown Hall");
INSERT INTO "stadium" VALUES ("205", "Lakeside Stage");