Class 14 Reading - Ginsusamurai/seattle-301d58 GitHub Wiki
Reasons to Normalize
- minimize duplicate data
- avoid/minimize data modification issues
- simplify queries
data duplication and modification anomalies
- increases storage and decreases performance
- more difficult to maintain data changes
consider an office moves cities, including all personnel:
- if the employee info is all on 1 line, partial updates can cause incorrect info
- requiring the same query on multiple columns, rather than just once
customer1 = 'ford' or customer2='ford'
etc
definition of database normalization
- types are
1st,2nd and 3rd normal form
or1NF, 2NF, 3NF
- the forms are progressive, so to be 3NF you need to meet requirements for 1NF and 2NF
1NF
- informatino is stored in a relational table with each column containing atomic values. No Repeating Groups of columns
2NF
- table is in first normal form and all the columns depend on the table's primary key
3NF
- the table is in second normal forma nd all of its columns are not transitively dependent on the primary key.