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 "Examination" (
"ID" INT,
"Examination Date" DATE,
"Thrombosis" INT,
FOREIGN KEY ("ID") REFERENCES "Patient"("ID")
);

CREATE TABLE "Patient" (
"ID" INT UNIQUE,
"SEX" TEXT,
PRIMARY KEY ("ID")
);



INSERT INTO "Patient" VALUES ("1", "F");
INSERT INTO "Patient" VALUES ("2", "M");
INSERT INTO "Patient" VALUES ("3", "F");
INSERT INTO "Patient" VALUES ("4", "F");
INSERT INTO "Patient" VALUES ("5", "M");
INSERT INTO "Patient" VALUES ("6", "F");
INSERT INTO "Patient" VALUES ("7", "M");
INSERT INTO "Patient" VALUES ("8", "F");
INSERT INTO "Patient" VALUES ("9", "F");
INSERT INTO "Patient" VALUES ("10", "M");
INSERT INTO "Examination" VALUES ("1", "1997-01-15", "1");
INSERT INTO "Examination" VALUES ("2", "1997-02-20", "0");
INSERT INTO "Examination" VALUES ("3", "1997-03-10", "1");
INSERT INTO "Examination" VALUES ("4", "1997-04-05", "1");
INSERT INTO "Examination" VALUES ("5", "1997-05-12", "0");
INSERT INTO "Examination" VALUES ("6", "1998-06-01", "1");
INSERT INTO "Examination" VALUES ("7", "1997-07-18", "0");
INSERT INTO "Examination" VALUES ("8", "1997-08-25", "1");
INSERT INTO "Examination" VALUES ("9", "1997-09-30", "0");
INSERT INTO "Examination" VALUES ("10", "1996-10-01", "1");
INSERT INTO "Examination" VALUES ("1", "1997-11-05", "0");
INSERT INTO "Examination" VALUES ("3", "1997-12-10", "0");
INSERT INTO "Examination" VALUES ("4", "1997-01-20", "0");
INSERT INTO "Examination" VALUES ("8", "1997-02-15", "0");