DEV Community

Katie Connor
Katie Connor

Posted on

Database Normalization

For this lab I chose the database admin centric topic to discuss. The term database normalization refers to the process that is used to organize information into a database made of tables and columns. There are three normalization forms, each form has they're own set of rules that are made to satisfy different sets of data.

For this project, the first two forms are the ones I will discuss- the first and second normal forms.

The first normal form has the following conditions:

  1. Rows are not ordered
  2. Columns are not ordered
  3. Duplicated data
  4. Intersections of rows and columns always have a unique value
  5. There are no hidden values in columns

An example of a first normal form table in my data base would be the Geographic Location table.
Alt Text

The second normal form has the following conditions:

  1. The table must be in 1 NF and the non-key columns must depend on the primary key
  2. The partial dependencies are removed and placed in a separate table A potential example of second normal form in my data base could be seen in the Company table. Alt Text By switching the primary key from zip code to industry, the non-key columns hours per week, number of employees and location would depend on it. Depending on what type of work one has, the hours would differ, whether someone could work at home or have to go in to to work, along with number of employees would all be effected.

Below is a video of me going more in-depth with this topic and how I altered my database so the Company table fits the second normal form criteria.
https://drive.google.com/file/d/1NaOsJ0VTV6fuZgZaOb2eNCPSuewi5myK/view

Top comments (0)