Hi all, I’m working on a temporary (so they say) database to keep track of case reports and I’m running into some issues. Very generically speaking, the logic works like this: The database will keep track of multiple studies. There are multiple patients in each study, and there is the possibility of many cases per ID. Where I’m running into problems is that an ID must be unique per study, however the same ID may be used across multiple studies – Both studies ABC and XYZ may have an ID 001.
Here are my tables (again, very simplified versions):
tblStudy (PK -> Study_ID)
Study_ID
Study_Name
tblPatient (PK -> Study_ID, Patient_ID)
Study_ID
Patient_ID
Initials
tblCase (PK -> Case_NO)
Case_NO
Patient_ID
Study_ID
Should I be referencing the Study_ID in tblCase or just the Patient_ID? Would I reference the Study_ID from tblStudy or tblPatient? If I have both and since they are 2 separate fields, it seems you could choose a study, and then an ID from the tblPatient that is not in the Study. I figure I can get around this in the form design, however it doesn’t seem like a good design to me. I usually try not to use Autonumbers as PK, however I’m totally against it. Thanks for the help!!
Here are my tables (again, very simplified versions):
tblStudy (PK -> Study_ID)
Study_ID
Study_Name
tblPatient (PK -> Study_ID, Patient_ID)
Study_ID
Patient_ID
Initials
tblCase (PK -> Case_NO)
Case_NO
Patient_ID
Study_ID
Should I be referencing the Study_ID in tblCase or just the Patient_ID? Would I reference the Study_ID from tblStudy or tblPatient? If I have both and since they are 2 separate fields, it seems you could choose a study, and then an ID from the tblPatient that is not in the Study. I figure I can get around this in the form design, however it doesn’t seem like a good design to me. I usually try not to use Autonumbers as PK, however I’m totally against it. Thanks for the help!!