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

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

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





INSERT INTO "stadium" VALUES ("1", "New York");
INSERT INTO "stadium" VALUES ("2", "London");
INSERT INTO "stadium" VALUES ("3", "Paris");
INSERT INTO "stadium" VALUES ("4", "Tokyo");
INSERT INTO "stadium" VALUES ("5", "Berlin");
INSERT INTO "concert" VALUES ("101", "1");
INSERT INTO "concert" VALUES ("102", "2");
INSERT INTO "concert" VALUES ("103", "3");
INSERT INTO "concert" VALUES ("104", "1");
INSERT INTO "concert" VALUES ("105", "4");
INSERT INTO "singer" VALUES ("1", "USA");
INSERT INTO "singer" VALUES ("2", "UK");
INSERT INTO "singer" VALUES ("3", "USA");
INSERT INTO "singer" VALUES ("4", "France");
INSERT INTO "singer" VALUES ("5", "UK");
INSERT INTO "singer" VALUES ("6", "Germany");
INSERT INTO "singer" VALUES ("7", "USA");
INSERT INTO "singer" VALUES ("8", "Japan");
INSERT INTO "singer" VALUES ("9", "France");
INSERT INTO "singer" VALUES ("10", "USA");
INSERT INTO "singer_in_concert" VALUES ("101", "1");
INSERT INTO "singer_in_concert" VALUES ("101", "3");
INSERT INTO "singer_in_concert" VALUES ("102", "2");
INSERT INTO "singer_in_concert" VALUES ("102", "5");
INSERT INTO "singer_in_concert" VALUES ("103", "4");
INSERT INTO "singer_in_concert" VALUES ("103", "9");
INSERT INTO "singer_in_concert" VALUES ("104", "7");
INSERT INTO "singer_in_concert" VALUES ("104", "10");
INSERT INTO "singer_in_concert" VALUES ("105", "8");
INSERT INTO "singer_in_concert" VALUES ("105", "6");