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

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



INSERT INTO "Player" VALUES ("1", "1001", "John Smith", "1985-04-12");
INSERT INTO "Player" VALUES ("2", "1002", "Carlos Ruiz", "1990-07-23");
INSERT INTO "Player" VALUES ("3", "1003", "Marco Rossi", "1988-11-05");
INSERT INTO "Player" VALUES ("4", "1004", "Lars Jensen", "1992-02-17");
INSERT INTO "Player" VALUES ("5", "1005", "Ivan Petrov", "1987-09-30");
INSERT INTO "Player" VALUES ("6", "1006", "David Brown", "1991-12-01");
INSERT INTO "Player" VALUES ("7", "1007", "Alexei Ivanov", "1989-06-15");
INSERT INTO "Player" VALUES ("8", "1008", "Peter Novak", "1993-03-22");
INSERT INTO "Player" VALUES ("9", "1009", "Jorge Martinez", "1986-08-10");
INSERT INTO "Player" VALUES ("10", "1010", "Tom Wilson", "1994-01-05");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "2010-03-15", "75", "80");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "2010-06-20", "78", "85");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "2010-09-10", "82", "88");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "2010-11-05", "70", "75");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "2010-01-25", "82", "90");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "2010-07-30", "68", "72");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "2010-05-18", "82", "87");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "2010-12-12", "65", "70");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "2010-04-22", "77", "80");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "2010-08-08", "60", "65");
INSERT INTO "Player_Attributes" VALUES ("11", "1001", "2009-10-10", "74", "79");
INSERT INTO "Player_Attributes" VALUES ("12", "1002", "2011-03-15", "79", "86");
INSERT INTO "Player_Attributes" VALUES ("13", "1003", "2011-06-20", "83", "89");
INSERT INTO "Player_Attributes" VALUES ("14", "1004", "2009-12-01", "69", "74");
INSERT INTO "Player_Attributes" VALUES ("15", "1005", "2011-01-10", "81", "91");