If I have, in my Java code, the following classes:
Patient:contains instance of anther classes (mentioned bellow)
PatientBasicInformation: contains PatientId, phoneNumber, Name, Gender, Age.
PatientImageFinidgns: contains Date, comments, lesionSize, site, procedure.
PatientLabFindings: contains Date, t1,t2,t3,t4.
PatientTreatment: contains visitNumber, Date, some other data.
Id is the primary key for
Date is very important key in both
visitNumber is my primary key in
How could I design these classes in a database. Should I create a table
Patient, which holds only foreign keys of the other classes (like
VisitNumber) or should I put
PatientId in the table
Patient as a primary key and as a foreign key in the
PatientBasicInformation table. If so, what would be the primary key in the
I want appreciate a simple and clear answer as I'm a new to databases and I have read a lot of articles, but I still don't get the whole picture.