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,
"crossing" INT,
"finishing" INT,
"dribbling" INT,
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", "Kevin De Bruyne", "1991-06-28");
INSERT INTO "Player" VALUES ("5", "1005", "David Beckham", "1975-05-02");
INSERT INTO "Player" VALUES ("6", "1006", "Andres Iniesta", "1984-05-11");
INSERT INTO "Player" VALUES ("7", "1007", "Mesut Ozil", "1988-10-15");
INSERT INTO "Player" VALUES ("8", "1008", "James Rodriguez", "1991-07-12");
INSERT INTO "Player" VALUES ("9", "1009", "Angel Di Maria", "1988-02-14");
INSERT INTO "Player" VALUES ("10", "1010", "Toni Kroos", "1990-01-04");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "75", "80", "85");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "70", "95", "88");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "65", "96", "92");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "90", "85", "89");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "95", "78", "80");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "85", "82", "90");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "88", "75", "87");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "80", "83", "84");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "92", "79", "86");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "60", "84", "88");