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



INSERT INTO "Player" VALUES ("1", "101", "Ariel Borysiuk", "180", "75");
INSERT INTO "Player" VALUES ("2", "102", "Paulin Puel", "175", "70");
INSERT INTO "Player" VALUES ("3", "103", "John Smith", "182", "78");
INSERT INTO "Player" VALUES ("4", "104", "Carlos Mendez", "178", "72");
INSERT INTO "Player" VALUES ("5", "105", "Luca Rossi", "185", "80");
INSERT INTO "Player_Attributes" VALUES ("1", "101", "78", "85");
INSERT INTO "Player_Attributes" VALUES ("2", "102", "65", "75");
INSERT INTO "Player_Attributes" VALUES ("3", "103", "70", "80");
INSERT INTO "Player_Attributes" VALUES ("4", "104", "60", "70");
INSERT INTO "Player_Attributes" VALUES ("5", "105", "82", "88");