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,
"Year" TEXT,
PRIMARY KEY ("concert_ID")
);

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

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





INSERT INTO "concert" VALUES ("1", "2010");
INSERT INTO "concert" VALUES ("2", "2011");
INSERT INTO "concert" VALUES ("3", "2012");
INSERT INTO "concert" VALUES ("4", "2013");
INSERT INTO "concert" VALUES ("5", "2014");
INSERT INTO "concert" VALUES ("6", "2015");
INSERT INTO "singer" VALUES ("1", "USA", "45");
INSERT INTO "singer" VALUES ("2", "USA", "25");
INSERT INTO "singer" VALUES ("3", "France", "50");
INSERT INTO "singer" VALUES ("4", "France", "29");
INSERT INTO "singer" VALUES ("5", "Germany", "41");
INSERT INTO "singer" VALUES ("6", "Germany", "28");
INSERT INTO "singer" VALUES ("7", "Italy", "42");
INSERT INTO "singer" VALUES ("8", "Italy", "31");
INSERT INTO "singer" VALUES ("9", "Spain", "39");
INSERT INTO "singer" VALUES ("10", "Spain", "22");
INSERT INTO "singer" VALUES ("11", "Canada", "60");
INSERT INTO "singer" VALUES ("12", "Canada", "27");
INSERT INTO "singer" VALUES ("13", "Brazil", "44");
INSERT INTO "singer" VALUES ("14", "Brazil", "19");
INSERT INTO "singer" VALUES ("15", "Japan", "41");
INSERT INTO "singer" VALUES ("16", "Japan", "29");
INSERT INTO "singer_in_concert" VALUES ("1", "1");
INSERT INTO "singer_in_concert" VALUES ("1", "2");
INSERT INTO "singer_in_concert" VALUES ("2", "3");
INSERT INTO "singer_in_concert" VALUES ("2", "4");
INSERT INTO "singer_in_concert" VALUES ("3", "5");
INSERT INTO "singer_in_concert" VALUES ("3", "6");
INSERT INTO "singer_in_concert" VALUES ("4", "7");
INSERT INTO "singer_in_concert" VALUES ("4", "8");
INSERT INTO "singer_in_concert" VALUES ("5", "9");
INSERT INTO "singer_in_concert" VALUES ("5", "10");
INSERT INTO "singer_in_concert" VALUES ("6", "11");
INSERT INTO "singer_in_concert" VALUES ("6", "12");
INSERT INTO "singer_in_concert" VALUES ("1", "13");
INSERT INTO "singer_in_concert" VALUES ("1", "14");
INSERT INTO "singer_in_concert" VALUES ("2", "15");
INSERT INTO "singer_in_concert" VALUES ("2", "16");
INSERT INTO "stadium" VALUES ("1", "New York");
INSERT INTO "stadium" VALUES ("2", "Paris");
INSERT INTO "stadium" VALUES ("3", "Berlin");
INSERT INTO "stadium" VALUES ("4", "Rome");
INSERT INTO "stadium" VALUES ("5", "Madrid");
INSERT INTO "stadium" VALUES ("6", "Toronto");
INSERT INTO "stadium" VALUES ("7", "Rio de Janeiro");
INSERT INTO "stadium" VALUES ("8", "Tokyo");