Monday, October 19, 2015

Normalization

First Normal Form

All data in a given attribute must be of the same kind No attribute should contain arrays—(lists of items) and there should be no repeating values

CDKey CDTitle
1     Jakalope
2     Popcorn

TrackKey CDKey  TrackTitle
1         1     Pretty Life
2         1     Feel It
3         1     Go Away
4         2     Please Please Please
5         2     Try me

Second Normal Form

Remove all functional dependencies Every entity should be about only one thing Groups of Attributes that depend on each other rather than on the main theme (key) of the Entity

Third Normal Form

Remove all transient dependencies Usually one field that refers to another field for its meaning rather than describing the whole topic (the key)

Here is the CD ERD after normalization

Here is the sale saleDetail relation

No comments:

Post a Comment