CREATE TABLE sample(
name VARCHAR(50) NOT NULL PRIMARY KEY,
donorVisitID VARCHAR(50),
FOREIGN KEY (donorVisitID) REFERENCES donor_visit (id)
);

CREATE TABLE donor_visit(
id VARCHAR(50) NOT NULL PRIMARY KEY,
donor VARCHAR(50),
content VARCHAR(50),
FOREIGN KEY (donor) REFERENCES donor (id)
);

CREATE TABLE donor(
id VARCHAR(50) NOT NULL PRIMARY KEY,
gender VARCHAR(50),
species VARCHAR(50),
strain VARCHAR(50),
dob VARCHAR(50)
);

CREATE TABLE visit_update(
updateID VARCHAR(50) NOT NULL PRIMARY KEY,
visit VARCHAR(50),
FOREIGN KEY (visit) REFERENCES donor_visit (id)
);

CREATE TABLE lab_test(
testID VARCHAR(50) NOT NULL PRIMARY KEY,
visitUpdate VARCHAR(50),
FOREIGN KEY (visitUpdate) REFERENCES visit_update (updateID)
);

CREATE TABLE diagnoses(
diagID VARCHAR(50) NOT NULL PRIMARY KEY,
visitUpdate VARCHAR (50),
FOREIGN KEY (visitUpdate) REFERENCES visit_update (updateID)
);

CREATE TABLE medications(
medicID VARCHAR(50) NOT NULL PRIMARY KEY,
visitUpdate VARCHAR (50),
FOREIGN KEY (visitUpdate) REFERENCES visit_update (updateID)
);

CREATE TABLE family_history(
histID VARCHAR(50) NOT NULL PRIMARY KEY,
visitUpdate VARCHAR (50),
FOREIGN KEY (visitUpdate) REFERENCES visit_update (updateID)
);

CREATE TABLE life_style_factors(
factID VARCHAR(50) NOT NULL PRIMARY KEY,
visitUpdate VARCHAR (50),
FOREIGN KEY (visitUpdate) REFERENCES visit_update (updateID)
);
