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

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

CREATE TABLE "Team_Attributes" (
"id" INT,
"chanceCreationCrossing" INT,
PRIMARY KEY ("id")
);



INSERT INTO "Player" VALUES ("1", "1001", "180");
INSERT INTO "Player" VALUES ("2", "1002", "175");
INSERT INTO "Player" VALUES ("3", "1003", "182");
INSERT INTO "Player" VALUES ("4", "1004", "178");
INSERT INTO "Player" VALUES ("5", "1005", "185");
INSERT INTO "Player" VALUES ("6", "1006", "177");
INSERT INTO "Player" VALUES ("7", "1007", "183");
INSERT INTO "Player" VALUES ("8", "1008", "179");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "85", "90", "right", "80");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "88", "92", "left", "90");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "90", "95", "left", "95");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "87", "95", "left", "95");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "83", "89", "right", "85");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "86", "91", "left", "88");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "89", "95", "right", "95");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "84", "90", "left", "90");
INSERT INTO "Team_Attributes" VALUES ("1", "95");
INSERT INTO "Team_Attributes" VALUES ("2", "90");
INSERT INTO "Team_Attributes" VALUES ("3", "85");