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,
"aCL IgG" FLOAT,
"ANA" INT,
"Thrombosis" INT,
FOREIGN KEY ("ID") REFERENCES "Patient"("ID")
);

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



INSERT INTO "Patient" VALUES ("1", "F", "Diagnosis A");
INSERT INTO "Patient" VALUES ("2", "M", "Diagnosis B");
INSERT INTO "Patient" VALUES ("3", "F", "Diagnosis C");
INSERT INTO "Patient" VALUES ("4", "F", "Diagnosis D");
INSERT INTO "Patient" VALUES ("5", "M", "Diagnosis E");
INSERT INTO "Patient" VALUES ("6", "F", "Diagnosis F");
INSERT INTO "Patient" VALUES ("7", "M", "Diagnosis G");
INSERT INTO "Patient" VALUES ("8", "F", "Diagnosis H");
INSERT INTO "Examination" VALUES ("1", "1997-03-15", "12.5", "1", "1");
INSERT INTO "Examination" VALUES ("2", "1997-07-22", "8.0", "0", "0");
INSERT INTO "Examination" VALUES ("3", "1997-11-05", "15.2", "1", "1");
INSERT INTO "Examination" VALUES ("4", "1997-01-30", "7.8", "0", "1");
INSERT INTO "Examination" VALUES ("5", "1997-05-18", "9.1", "1", "0");
INSERT INTO "Examination" VALUES ("6", "1997-12-12", "11.0", "0", "1");
INSERT INTO "Examination" VALUES ("7", "1996-08-09", "10.5", "1", "1");
INSERT INTO "Examination" VALUES ("8", "1997-09-25", "13.3", "0", "0");
INSERT INTO "Examination" VALUES ("1", "1998-02-20", "14.0", "1", "1");
INSERT INTO "Examination" VALUES ("3", "1997-06-14", "16.0", "1", "0");