42

Database Normalization Explained

 4 years ago
source link: https://www.tuicool.com/articles/yIZJ3in
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Normalization is a technique for organizing data in a database. It is important that a database is normalized to minimize redundancy (duplicate data) and to ensure only related data is stored in each table. It also prevents any issues stemming from database modifications such as insertions, deletions, and updates.

The stages of organization are called normal forms . In this tutorial we be redesigning a database for a construction company and ensuring that it satisfies the three normal forms:

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
  • There are 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
  • There are no in-table dependencies between the columns in each table

Note that there are actually six levels of normalization; however, the third normal form is considered the highest level necessary for most applications so we will only be discussing the first three forms.

Let’s get started!

This tutorial is adapted from Next Tech’s Database Fundamentals course which comes with an in-browser sandboxed environment and interactive tasks and projects to complete. You can get started here for free!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK