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,
"potential" INT,
"acceleration" INT,
"sprint_speed" INT,
"agility" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "101", "Alexis Blin", "180");
INSERT INTO "Player" VALUES ("2", "102", "John Smith", "175");
INSERT INTO "Player" VALUES ("3", "103", "Carlos Vega", "182");
INSERT INTO "Player" VALUES ("4", "104", "Marco Rossi", "178");
INSERT INTO "Player" VALUES ("5", "105", "Liam O'Connor", "185");
INSERT INTO "Player_Attributes" VALUES ("1", "101", "75", "80", "78", "82", "79");
INSERT INTO "Player_Attributes" VALUES ("2", "102", "70", "75", "65", "68", "70");
INSERT INTO "Player_Attributes" VALUES ("3", "103", "85", "88", "90", "91", "89");
INSERT INTO "Player_Attributes" VALUES ("4", "104", "60", "65", "55", "58", "57");
INSERT INTO "Player_Attributes" VALUES ("5", "105", "77", "79", "80", "83", "81");