Hi all, hoping that I'm not asking too much. I'm currently in the process of trying to re-design a database that I didn't make so it's a bit more normalized, there's lots of redundancy in places and I remember being taught in A-level IT(basically extent of my knowledge plus what I've picked up) that this isn't very good. It basically has no well setup relationships either. I'm using Access and don't know SQL or VBA, hope that isn't going to be an issue.
Basically it's a database for patients and blood results from 3 types of tests. At the moment it has the tables as follows;
Essentially, I have 8 tables that I can think of.
Patients(all their details, contains team, doctor and named carer)
TestType1(Blood level) Results (patient id, result, date)
...Drug table - literally just related to Test1 Results above, drug related to the test. Not sure if needed or could just be placed by a list box in Test1.
Test2 Results(KidneyFunction) (patient id, result, date)
Test3 Results(ThyroidFunction) (patient id, result, date)
Named Carers (Name, e-mail, team base)
Doctor (Name, e-mail, team base)
Team (List of teams - for above two tables and patients)
(see attached pic for a better idea)
My issue is; Every patient(many) has a doctor(1), and every patient(many) has a named carer(1). A named carer will never be the doctor, BUT the doctor CAN be the named carer AND the doctor both(not always). How do I solve the problem without the two tables, or can't I?
Tbh, I actually need more help really if anyone is happy to offer. Looking to put the best structure for my data in place(patients table will need to link to carers, doctors, AND team, but in some ways there's redundancy because their carer/doctor will be in the SAME team, and I don't really know how to pull it through from just their Named Carer/Doctor). My current plan of relationships is in pic as attached;
I did think just about putting the Doctors/Named Carers(as it's all the same details for each) just into one table and going from there, I just wasn't sure how to make sure a Named Carer who isn't a Doctor doesn't get accidentally listed AS a Doctor for a patient. Would it involve a Yes/No field and some validation of some sort?
EDIT: Should I have zipped the png? Apologies for not :x
Basically it's a database for patients and blood results from 3 types of tests. At the moment it has the tables as follows;
Essentially, I have 8 tables that I can think of.
Patients(all their details, contains team, doctor and named carer)
TestType1(Blood level) Results (patient id, result, date)
...Drug table - literally just related to Test1 Results above, drug related to the test. Not sure if needed or could just be placed by a list box in Test1.
Test2 Results(KidneyFunction) (patient id, result, date)
Test3 Results(ThyroidFunction) (patient id, result, date)
Named Carers (Name, e-mail, team base)
Doctor (Name, e-mail, team base)
Team (List of teams - for above two tables and patients)
(see attached pic for a better idea)
My issue is; Every patient(many) has a doctor(1), and every patient(many) has a named carer(1). A named carer will never be the doctor, BUT the doctor CAN be the named carer AND the doctor both(not always). How do I solve the problem without the two tables, or can't I?
Tbh, I actually need more help really if anyone is happy to offer. Looking to put the best structure for my data in place(patients table will need to link to carers, doctors, AND team, but in some ways there's redundancy because their carer/doctor will be in the SAME team, and I don't really know how to pull it through from just their Named Carer/Doctor). My current plan of relationships is in pic as attached;
I did think just about putting the Doctors/Named Carers(as it's all the same details for each) just into one table and going from there, I just wasn't sure how to make sure a Named Carer who isn't a Doctor doesn't get accidentally listed AS a Doctor for a patient. Would it involve a Yes/No field and some validation of some sort?
EDIT: Should I have zipped the png? Apologies for not :x
Attachments
Last edited: