Wednesday, January 17, 2018

Normalization.

Normalization

--standard white papers

Anomalies Update anomaly--update info in more than one place Insert Anomaly: can't insert one thing because it depends on another, and can't insert the other because it depends on the first (a loop) Deletion Anomaly: If you delete something you unintentionally lose something else.

First normal form

 no repeating groups and no arrays
CD Tracks Track1, Track2, track3
Tracks (My Generation, Substitute, pinball wizard)
anything that can have multiple values, should be seperated out into its own table
--solution
CD(CdID, Title, Year)
Track(TrackID, CDID, TrackTitle)

Second Normal Form

Every entity should be about only one thing.
Should not have any functional dependencies
Remove Blocks of Attributes that relate to each other but not
the main topic (the key)
For example if these attributes were in CD
StudioName, StudioAddress, StudioURL, 

Third normal form

Every entity should be about only one thing.
Every attribute should describe the main thing.
transitive dependency
artist, artistCountry

No comments:

Post a Comment