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_fifa_api_id" INT,
"player_api_id" INT,
"overall_rating" INT,
"potential" INT,
"heading_accuracy" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "1001", "John Smith", "182", "75");
INSERT INTO "Player" VALUES ("2", "1002", "Alex Johnson", "185", "80");
INSERT INTO "Player" VALUES ("3", "1003", "Michael Brown", "178", "78");
INSERT INTO "Player" VALUES ("4", "1004", "Chris Davis", "190", "85");
INSERT INTO "Player" VALUES ("5", "1005", "David Wilson", "181", "77");
INSERT INTO "Player" VALUES ("6", "1006", "James Taylor", "183", "79");
INSERT INTO "Player" VALUES ("7", "1007", "Robert Moore", "179", "76");
INSERT INTO "Player" VALUES ("8", "1008", "Daniel Anderson", "187", "82");
INSERT INTO "Player" VALUES ("9", "1009", "Paul Thomas", "184", "81");
INSERT INTO "Player" VALUES ("10", "1010", "Mark Jackson", "186", "83");
INSERT INTO "Player" VALUES ("11", "1011", "Steven White", "180", "74");
INSERT INTO "Player" VALUES ("12", "1012", "Kevin Harris", "188", "84");
INSERT INTO "Player_Attributes" VALUES ("1", "5001", "1001", "75", "80", "70");
INSERT INTO "Player_Attributes" VALUES ("2", "5002", "1001", "78", "82", "72");
INSERT INTO "Player_Attributes" VALUES ("3", "5003", "1002", "80", "85", "85");
INSERT INTO "Player_Attributes" VALUES ("4", "5004", "1002", "82", "87", "88");
INSERT INTO "Player_Attributes" VALUES ("5", "5005", "1003", "70", "75", "60");
INSERT INTO "Player_Attributes" VALUES ("6", "5006", "1004", "85", "90", "90");
INSERT INTO "Player_Attributes" VALUES ("7", "5007", "1004", "88", "92", "92");
INSERT INTO "Player_Attributes" VALUES ("8", "5008", "1005", "74", "78", "68");
INSERT INTO "Player_Attributes" VALUES ("9", "5009", "1005", "76", "79", "70");
INSERT INTO "Player_Attributes" VALUES ("10", "5010", "1006", "77", "80", "75");
INSERT INTO "Player_Attributes" VALUES ("11", "5011", "1006", "79", "82", "78");
INSERT INTO "Player_Attributes" VALUES ("12", "5012", "1007", "72", "76", "65");
INSERT INTO "Player_Attributes" VALUES ("13", "5013", "1008", "83", "88", "87");
INSERT INTO "Player_Attributes" VALUES ("14", "5014", "1008", "85", "90", "89");
INSERT INTO "Player_Attributes" VALUES ("15", "5015", "1009", "81", "85", "80");
INSERT INTO "Player_Attributes" VALUES ("16", "5016", "1009", "83", "87", "82");
INSERT INTO "Player_Attributes" VALUES ("17", "5017", "1010", "84", "88", "86");
INSERT INTO "Player_Attributes" VALUES ("18", "5018", "1010", "86", "90", "88");
INSERT INTO "Player_Attributes" VALUES ("19", "5019", "1011", "73", "77", "67");
INSERT INTO "Player_Attributes" VALUES ("20", "5020", "1012", "87", "91", "91");
INSERT INTO "Player_Attributes" VALUES ("21", "5021", "1012", "89", "93", "93");