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,
"overall_rating" INT,
"defensive_work_rate" TEXT,
"interceptions" INT,
"marking" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "1001", "John Smith", "180");
INSERT INTO "Player" VALUES ("2", "1002", "Alex Johnson", "175");
INSERT INTO "Player" VALUES ("3", "1003", "Michael Brown", "182");
INSERT INTO "Player" VALUES ("4", "1004", "Chris Davis", "178");
INSERT INTO "Player" VALUES ("5", "1005", "David Wilson", "185");
INSERT INTO "Player" VALUES ("6", "1006", "James Taylor", "177");
INSERT INTO "Player" VALUES ("7", "1007", "Robert Moore", "183");
INSERT INTO "Player" VALUES ("8", "1008", "Daniel Anderson", "179");
INSERT INTO "Player" VALUES ("9", "1009", "Mark Thomas", "181");
INSERT INTO "Player" VALUES ("10", "1010", "Paul Jackson", "176");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "62", "low", "10", "15");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "64", "medium", "20", "18");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "61", "low", "12", "14");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "63", "high", "25", "20");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "60", "low", "8", "10");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "65", "low", "15", "12");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "59", "low", "9", "11");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "62", "medium", "18", "17");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "64", "low", "11", "13");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "66", "low", "14", "16");