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", "80");
INSERT INTO "Player" VALUES ("2", "1002", "Player B", "175", "70");
INSERT INTO "Player" VALUES ("3", "1003", "Player C", "190", "85");
INSERT INTO "Player" VALUES ("4", "1004", "Player D", "182", "78");
INSERT INTO "Player" VALUES ("5", "1005", "Player E", "170", "65");
INSERT INTO "Player" VALUES ("6", "1006", "Player F", "195", "90");
INSERT INTO "Player" VALUES ("7", "1007", "Player G", "188", "82");
INSERT INTO "Player" VALUES ("8", "1008", "Player H", "178", "72");
INSERT INTO "Player" VALUES ("9", "1009", "Player I", "181", "75");
INSERT INTO "Player" VALUES ("10", "1010", "Player J", "165", "60");
INSERT INTO "Player" VALUES ("11", "1011", "Player K", "183", "79");
INSERT INTO "Player" VALUES ("12", "1012", "Player L", "172", "68");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "85", "75");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "78", "65");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "90", "80");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "82", "68");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "70", "55");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "92", "85");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "88", "72");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "75", "60");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "80", "71");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "65", "50");
INSERT INTO "Player_Attributes" VALUES ("11", "1011", "81", "69");
INSERT INTO "Player_Attributes" VALUES ("12", "1012", "73", "58");