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

CREATE TABLE "Player_Attributes" (
"id" INT,
"player_api_id" INT,
"crossing" INT,
"finishing" INT,
"short_passing" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "1001", "Aaron Lennox", "185");
INSERT INTO "Player" VALUES ("2", "1002", "John Smith", "178");
INSERT INTO "Player" VALUES ("3", "1003", "Aaron Lennox", "182");
INSERT INTO "Player" VALUES ("4", "1004", "Michael Brown", "190");
INSERT INTO "Player" VALUES ("5", "1005", "Aaron Lennox", "180");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "70", "65", "75");
INSERT INTO "Player_Attributes" VALUES ("2", "1001", "60", "70", "80");
INSERT INTO "Player_Attributes" VALUES ("3", "1002", "50", "55", "60");
INSERT INTO "Player_Attributes" VALUES ("4", "1003", "40", "45", "50");
INSERT INTO "Player_Attributes" VALUES ("5", "1003", "30", "35", "40");
INSERT INTO "Player_Attributes" VALUES ("6", "1004", "20", "25", "30");
INSERT INTO "Player_Attributes" VALUES ("7", "1005", "10", "15", "20");
INSERT INTO "Player_Attributes" VALUES ("8", "1005", "5", "10", "15");