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...
____ methods share the same name but differ in the number or types of the parameters they accept.
A. Abstract B. Inherited C. Overloaded D. Final
A Word ____________________ is a collection of rows and columns.
Fill in the blank(s) with the appropriate word(s).
The sole purpose of an evidence bag is to prevent tampering of evidence
Indicate whether the statement is true or false.
The level of the root node of a binary tree is 1.
Answer the following statement true (T) or false (F)