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 "Player" (
"id" INT,
"player_api_id" INT UNIQUE,
"player_name" TEXT,
"birthday" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "Player_Attributes" (
"id" INT,
"player_api_id" INT,
"overall_rating" INT,
"attacking_work_rate" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "1001", "Luka Modric", "1985-09-09");
INSERT INTO "Player" VALUES ("2", "1002", "Cristiano Ronaldo", "1985-02-05");
INSERT INTO "Player" VALUES ("3", "1003", "Lionel Messi", "1987-06-24");
INSERT INTO "Player" VALUES ("4", "1004", "N'Golo Kante", "1991-03-29");
INSERT INTO "Player" VALUES ("5", "1005", "Kevin De Bruyne", "1991-06-28");
INSERT INTO "Player" VALUES ("6", "1006", "Sergio Ramos", "1986-03-30");
INSERT INTO "Player" VALUES ("7", "1007", "Robert Lewandowski", "1988-08-21");
INSERT INTO "Player" VALUES ("8", "1008", "Paul Pogba", "1993-03-15");
INSERT INTO "Player" VALUES ("9", "1009", "Eden Hazard", "1991-01-07");
INSERT INTO "Player" VALUES ("10", "1010", "Toni Kroos", "1990-01-04");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "88", "medium");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "93", "high");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "94", "high");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "87", "low");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "91", "high");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "89", "medium");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "92", "high");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "85", "medium");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "90", "high");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "88", "medium");