I am trying to work on this model and figure out the following questions about it:
What is (are) the candidate key(s) of PATIENT_VISIT?
If there is more than one candidate key, select a primary key from among the candidate keys.
Based on the primary key chosen, what normal form violations exist in PATIENT_VISIT?
Develop a solution that eliminates the normal form violations.
Is your solution a lossless-join decomposition?
Is your solution dependency-preserving? If not, how can dependency preservation be achieved? Is this revised solution in BCNF?
Provide a solution that meets all three of the following conditions: (1) is in BCNF, (2) is dependency-preserving, and (3) is a lossless-join decomposition
+---------+------------+------------+ | Patient | Hospital | Doctor | +---------+------------+------------+ | Smith | Methodist | D. Cooley | | Lee | St. Luke's | Z. Zhang | | Marks | Methodist | D. Cooley | | Marks | St. Luke's | W. Lowe | | Lou | Hermann R. | Duke | +---------+------------+------------+
In addition, suppose the following semantic rules exist.
{Patient, Doctor} is a candidate key. The only other possible key is {Patient, Hospital, Doctor}, but that is not minimal because of the FD Doctor ⟶ Hospital; it is a superkey but not a candidate key.
Moot; there's only one candidate key.
The schema is not in BCNF because of the transitive dependency (FD) Doctor ⟶ Hospital. (Each attribute of the table is functionally determined by the key, the whole key, and nothing but the key.)
PD { Patient, Doctor }, DH { Doctor, Hospital }. This is a lossless decomposition.
This solution is dependency preserving.
See 4.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.