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,
"Theme" TEXT,
"Year" TEXT,
PRIMARY KEY ("concert_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 ("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", "Rock Anthems", "2023");
INSERT INTO "concert" VALUES ("2", "Winter Gala", "Classical Melodies", "2022");
INSERT INTO "concert" VALUES ("3", "Spring Jam", "Pop Hits", "2023");
INSERT INTO "concert" VALUES ("4", "Autumn Blues", "Jazz Night", "2021");
INSERT INTO "concert" VALUES ("5", "New Year's Eve Bash", "Party Mix", "2023");
INSERT INTO "concert" VALUES ("6", "Acoustic Evening", "Unplugged", "2022");
INSERT INTO "concert" VALUES ("7", "Global Rhythms", "World Music", "2023");
INSERT INTO "singer" VALUES ("101", "Freddie Mercury");
INSERT INTO "singer" VALUES ("102", "Adele");
INSERT INTO "singer" VALUES ("103", "Louis Armstrong");
INSERT INTO "singer" VALUES ("104", "Taylor Swift");
INSERT INTO "singer" VALUES ("105", "Ed Sheeran");
INSERT INTO "singer" VALUES ("106", "Beyonce");
INSERT INTO "singer" VALUES ("107", "Andrea Bocelli");
INSERT INTO "singer" VALUES ("108", "Bob Marley");
INSERT INTO "singer" VALUES ("109", "Lady Gaga");
INSERT INTO "singer" VALUES ("110", "Elvis Presley");
INSERT INTO "singer_in_concert" VALUES ("1", "101");
INSERT INTO "singer_in_concert" VALUES ("1", "110");
INSERT INTO "singer_in_concert" VALUES ("1", "105");
INSERT INTO "singer_in_concert" VALUES ("2", "107");
INSERT INTO "singer_in_concert" VALUES ("3", "102");
INSERT INTO "singer_in_concert" VALUES ("3", "104");
INSERT INTO "singer_in_concert" VALUES ("3", "106");
INSERT INTO "singer_in_concert" VALUES ("3", "109");
INSERT INTO "singer_in_concert" VALUES ("4", "103");
INSERT INTO "singer_in_concert" VALUES ("5", "102");
INSERT INTO "singer_in_concert" VALUES ("5", "104");
INSERT INTO "singer_in_concert" VALUES ("6", "105");
INSERT INTO "singer_in_concert" VALUES ("7", "108");
INSERT INTO "singer_in_concert" VALUES ("7", "103");