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

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



INSERT INTO "Player" VALUES ("1", "1001", "Player A", "185", "75");
INSERT INTO "Player" VALUES ("2", "1002", "Player B", "178", "70");
INSERT INTO "Player" VALUES ("3", "1003", "Player C", "190", "80");
INSERT INTO "Player" VALUES ("4", "1004", "Player D", "182", "72");
INSERT INTO "Player" VALUES ("5", "1005", "Player E", "175", "68");
INSERT INTO "Player" VALUES ("6", "1006", "Player F", "188", "78");
INSERT INTO "Player" VALUES ("7", "1007", "Player G", "180", "70");
INSERT INTO "Player" VALUES ("8", "1008", "Player H", "195", "85");
INSERT INTO "Player" VALUES ("9", "1009", "Player I", "181", "71");
INSERT INTO "Player" VALUES ("10", "1010", "Player J", "170", "65");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "85", "72");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "78", "65");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "90", "78");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "82", "68");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "75", "75");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "88", "80");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "79", "70");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "92", "82");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "81", "71");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "70", "60");
INSERT INTO "Player_Attributes" VALUES ("11", "1001", "86", "73");
INSERT INTO "Player_Attributes" VALUES ("12", "1003", "91", "79");
INSERT INTO "Player_Attributes" VALUES ("13", "1004", "83", "72");
INSERT INTO "Player_Attributes" VALUES ("14", "1006", "89", "81");
INSERT INTO "Player_Attributes" VALUES ("15", "1008", "93", "83");
INSERT INTO "Player_Attributes" VALUES ("16", "1009", "82", "70");