문제

I have normalized some tables up to 2nd normal form.

the normalized tables

I am confused with 3rd normal form as it is similar to 2nd normal form. I know that 2nd normal form has partial dependencies and 3rd normal form has transitive dependencies.

According to the scenario given to me, a nurse can only be assigned to one patient. Is the nurse table already in 3rd normal form?

What is the difference between 2nd normal form and 3rd normal form?

도움이 되었습니까?

해결책

The difference between 2NF and 3NF is this. Suppose that some relation satisfies a non-trivial functional dependency of the form A->B, where B is a nonprime attribute.

2NF is violated if A is not a superkey but is a proper subset of a candidate key

3NF is violated if A is not a superkey

"Superkey" just means any set of attributes that includes a candidate key of your table.

Therefore if a relation satisfies 3NF then it already satisfies 2NF. In that sense, 2NF itself is not especially important. Actually 3NF is not especially important either. Boyce-Codd Normal Form is more important but I guess this is homework and you are expected to study 2NF and 3NF first.

No one can say for sure whether your design satisfies 3NF or not because you haven't said what dependencies it is supposed to satisfy. Judging by the names of your attributes it seems unlikely that your design is correct. It appears that a nurse can only be assigned one patient at a time, which I guess would not be right.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top