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,
PRIMARY KEY ("id")
);

CREATE TABLE "Player_Attributes" (
"id" INT,
"player_api_id" INT,
"overall_rating" INT,
"short_passing" INT,
"dribbling" INT,
"ball_control" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "101", "Abdou Diallo");
INSERT INTO "Player" VALUES ("2", "102", "Aaron Appindangoye");
INSERT INTO "Player" VALUES ("3", "103", "Other Player One");
INSERT INTO "Player" VALUES ("4", "104", "Other Player Two");
INSERT INTO "Player_Attributes" VALUES ("1", "101", "75", "80", "70", "85");
INSERT INTO "Player_Attributes" VALUES ("2", "101", "78", "82", "72", "88");
INSERT INTO "Player_Attributes" VALUES ("3", "101", "74", "79", "69", "84");
INSERT INTO "Player_Attributes" VALUES ("4", "102", "65", "70", "60", "75");
INSERT INTO "Player_Attributes" VALUES ("5", "102", "67", "72", "62", "77");
INSERT INTO "Player_Attributes" VALUES ("6", "103", "80", "85", "75", "90");
INSERT INTO "Player_Attributes" VALUES ("7", "104", "60", "65", "55", "70");