Consider the following relation:
R (Doctor#, Patient#, Date, Diagnosis, Treat_code, Charge)
In this relation, a tuple describes a visit of a patient to a doctor along with a treatment code and daily charge. Assume that diagnosis is determined (uniquely) for each patient by a doctor. Assume that each treatment code has a fixed charge (regardless of patient). Is this relation in 2NF? Justify your answer and decompose if necessary. Then argue whether further normalization to 3NF is necessary, and if so, perform it.
From the question’s text, we can infer the following functional dependencies:
{Doctor#, Patient#, Date}?{Diagnosis, Treat_code, Charge}
{Treat_code}?{Charge}
Because there are no partial dependencies, the given relation is in 2NF already. This however is not 3NF because the Charge is a nonkey attribute that is determined by another nonkey attribute, Treat_code. We must decompose further:
R (Doctor#, Patient#, Date, Diagnosis, Treat_code)
R1 (Treat_code, Charge)
We could further infer that the treatment for a given diagnosis is functionally dependant, but we should be sure to allow the doctor to have some flexibility when prescribing cures.
You might also like to view...
An object model consists of a(n) ________ collection of objects, consisting of properties, methods, and events that can be manipulated using VBA
Fill in the blank(s) with correct word
In a state transition diagram, the states appear as rounded rectangles with the state names inside.
Answer the following statement true (T) or false (F)