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,
"birthday" 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", "1001", "1980-05-12", "180", "75");
INSERT INTO "Player" VALUES ("2", "1002", "1985-11-23", "175", "70");
INSERT INTO "Player" VALUES ("3", "1003", "1986-01-01", "182", "78");
INSERT INTO "Player" VALUES ("4", "1004", "1975-07-30", "178", "72");
INSERT INTO "Player" VALUES ("5", "1005", "1990-03-15", "185", "80");
INSERT INTO "Player" VALUES ("6", "1006", "1984-12-05", "177", "74");
INSERT INTO "Player" VALUES ("7", "1007", "1983-09-20", "179", "76");
INSERT INTO "Player" VALUES ("8", "1008", "1987-06-10", "181", "77");
INSERT INTO "Player" VALUES ("9", "1009", "1982-02-28", "176", "73");
INSERT INTO "Player" VALUES ("10", "1010", "1985-12-31", "183", "79");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "85", "90");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "78", "85");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "80", "88");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "90", "92");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "75", "80");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "82", "87");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "88", "91");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "77", "83");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "84", "89");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "79", "86");