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,
"Song_release_year" TEXT,
"Age" INT,
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")
);





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", "Rock Revival");
INSERT INTO "concert" VALUES ("6", "Pop Explosion");
INSERT INTO "singer" VALUES ("101", "Alice", "Dreamscape", "2020", "25");
INSERT INTO "singer" VALUES ("102", "Bob", "Midnight Serenade", "2018", "30");
INSERT INTO "singer" VALUES ("103", "Charlie", "Echoes of Time", "2022", "22");
INSERT INTO "singer" VALUES ("104", "Diana", "Starlight Symphony", "2019", "28");
INSERT INTO "singer" VALUES ("105", "Eve", "Whispering Winds", "2021", "22");
INSERT INTO "singer" VALUES ("106", "Frank", "Rhythm of the Rain", "2017", "35");
INSERT INTO "singer" VALUES ("107", "Grace", "Golden Horizon", "2023", "22");
INSERT INTO "singer" VALUES ("108", "Henry", "Silent Shores", "2016", "40");
INSERT INTO "singer" VALUES ("109", "Ivy", "Crimson Tide", "2024", "22");
INSERT INTO "singer" VALUES ("110", "Jack", "Blue Moon", "2015", "45");
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 ("3", "106");
INSERT INTO "singer_in_concert" VALUES ("4", "107");
INSERT INTO "singer_in_concert" VALUES ("4", "108");
INSERT INTO "singer_in_concert" VALUES ("5", "109");
INSERT INTO "singer_in_concert" VALUES ("5", "110");
INSERT INTO "singer_in_concert" VALUES ("6", "101");
INSERT INTO "singer_in_concert" VALUES ("6", "103");
INSERT INTO "singer_in_concert" VALUES ("6", "105");
INSERT INTO "singer_in_concert" VALUES ("6", "107");
INSERT INTO "singer_in_concert" VALUES ("6", "109");