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

CREATE TABLE "Player_Attributes" (
"id" INT,
"player_api_id" INT,
"overall_rating" INT,
"potential" INT,
"attacking_work_rate" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Player" VALUES ("1", "1001", "Franco Zennaro");
INSERT INTO "Player" VALUES ("2", "1002", "Luca Toni");
INSERT INTO "Player" VALUES ("3", "1003", "Marco Verratti");
INSERT INTO "Player" VALUES ("4", "1004", "Andres Iniesta");
INSERT INTO "Player" VALUES ("5", "1005", "Franco Zennaro Jr");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "75", "80", "High");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "82", "85", "Medium");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "88", "90", "Low");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "91", "92", "Medium");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "70", "78", "High");