Database dependencies

Not sure where else to go, so ill post here. If anyone is familiar with databases or determinants at all, could you please help me with one of my class problems that I am stuck on?

The following:
Imagine the scenario of a hospital database. Would patientID (a number that uniquely identifies the patient at a hospital) be the determinant in a functional dependency with diagnosis (the patient’s illness)? In other words, would patientID--> diagnosis?

I have used the following website to help break things down for me, http://www.sitepoint.com/database-design-management/

but it still just doesn't make sense.
Hi,

Consider this:

How many diagnoses can a patient have? Think about that in terms of looking up records in the Diagnoses table with a solitary foreign key (patientID), and decide whether it will work or not.

Hope that helps a bit :+)
Well, I guess a person can have several Diagnosis, so it depends on what illness they have first.. so do we need to know their illness before we can diagnose them? So this wouldn't work? That's my guess xD
Yes, I was thinking that PatientID alone would not suffice.

so it depends on what illness they have first.. so do we need to know their illness before we can diagnose them?


I wouldn't think about it like that. What illness they have first should be irrelevant. If you are designing the DB, what fields would you put in the diagnoses table, given that that there might be several diagnoses' per patient?

Now, think about what the original question was. Putting it another way: Is a PatientID alone sufficient to identify 1 record in the Diagnoses table?

Another way to think about it: What type of relation is there between the Patient table and the Diagnoses table?

A typical GUI front end for a DB would have the info for one table (Patient) at the top of the screen, then some buttons to select other relevant info (Admissions with dates, appointments with specialists, Xrays etc, Diagnoses') which is displayed at the bottom of the screen
If one patient can have many diagnoses and one diagnosis can belong to many patients then this is a many to many relationship. https://en.wikipedia.org/wiki/Many-to-many_%28data_model%29
Topic archived. No new replies allowed.