Now that we have an actual set of tables formulated, there is a need to be sure that the data in the tables are not scrambled. So for this week, I will be 'normalizing' my data.
Normalization is a technique for organizing data in a database.The organization of data is managed with the form of stages of organization are called normal forms. These are the forms applied in a database.
First Normal Form (1NF):
- Data is stored in tables with rows uniquely identified by a primary key
- Data within each table is stored in individual columns in its most reduced form
- No repeating groups
Second Normal Form (2NF):
- Everything from 1NF
- Only data that relates to a table’s primary key is stored in each table
Third Normal Form (3NF):
- Everything from 2NF
Here's the alteration of one of my tables via normalization:
Before
After
As you can see, the column of 'Cities' was removed due to latent redundancy (zipcode can be used to find city name anyways).
Top comments (0)