-3

LabResults:

FirstName, LastName, DOB, Gender, ConsultDoctor, SSN, Address, Phone -- pk, TestRequest, ChemistryPanels, DrugLevel

ImagingResults:

PatientName, DOB, Phone fk, ICD9, Authorization, ReferringPhysician, PhysicianNum fk, MRI, CT, Mammogram, Ultrasound, Nuclear Medicine, PET/CT, GeneralRadiology, Others

Above are two entities and attributes for project im doing. What im wondering is if my functional dependency are correct.

Phone  (FirstName, LastName, DOB, Gender, SSN, Address, ConsultDoctor, TestRequest, ChemistryPanels, DrugLevel)

Phone  (PatientName, DOB, ICD9, AuthorizationNum, ReferringPhysician, PhysicianNum, MRI, CT, Mammogram, Ultrasound, Nuclear Medicine, PET/CT, GeneralRadiology, Others)

philipxy
  • 14,867
  • 6
  • 39
  • 83
Javy
  • 1
  • Really not sure what you mean by "functional dependency", also why have you tagged this as Visio? – TomC Mar 07 '19 at 02:22
  • 1
    Please justify your work. That includes giving anything you were given or assumed about the business & why your FDs make sense. Names of tables & columns do not tell us much, and nothing about what you decided to do with them. Otherwise we have nothing to critique or even propose about your work. PS Please look at the formatted version of your post below the edit box before you post. Also this has some uncommon/unprintable characters. – philipxy Mar 07 '19 at 04:44
  • 1
    It is not clear what you are trying to ask. What are you trying to accomplish, given what? What does "are correct" mean? – philipxy Mar 07 '19 at 21:59

1 Answers1

1

Some things.

FDs are usually denoted using LHS arrow RHS kind of syntax, e.g. phone -> DOB,SSN.

Sometimes braces are explicitly written to stress the notion that LHS and RHS are sets of attributes : {phone} -> {DOB,SSN}.

It seems like you are given two relation schemas here. In the usual notation, it's the schemas that are denoted using the name paren attrs paren syntax : LabResults(FirstName,LastName,...).

Mentioning which attribute is [part of the] "primary key" is having things upside down and backwards : which keys apply to a relation schema is supposed to be a consequence of which FDs apply to it (and the FDs must be given, not the keys).

If you are given the candidate key[s], then finding the FDs is just a matter of replacing LHS with the key and RHS with the rest, for each given key, which you have done correctly for the LabResults schema, modulo deviating from the usual syntax.

For the second schema, your quoted text does not appear to be giving you any keys (foreign keys are not [candidate] keys as per normalization theory). Furthermore, whatever appears for the LHS portion of an FD must be [a set of] attribute[s] of the schema itself. ImagingResults does not have a phone attribute so you've gone wrong there.

Erwin Smout
  • 18,113
  • 4
  • 33
  • 52