SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Normalizing Your Database

If you’ve been working with databases for any length of time, you have heard the term normalization.

Normalization is the process of efficiently organizing data in a database.  There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table).  Reaching these two goals reduces the space used by the database and ensures the data is stored logically.

Guidelines have been developed to confirm that databases are normalized.  These are referred to as normal forms and are numbered from one (the lowest form of normalization, referred to as first normal form or 1NF) through six (sixth normal form or 6NF).  However, the 5th and 6th normal forms are rarely used, so I’m not going to mention those below.  Also note that most database architects start out designing in 3rd normal form, so it’s not necessary to perform these normalizations in order.

First Normal Form (1NF)

First Normal Form (1NF) sets the very basic rules for an organized database:

  • Eliminate duplicative columns from the same table
  • Create separate tables for each set of related data
  • Identify each row with a unique column (the primary key)

Second Normal Form (2NF)

Second normal form (2NF) further addresses the concept of removing duplicative data:

  • Meet all the requirements of the first normal form
  • Remove subsets of data that apply to multiple rows of a table and place them in separate tables
  • Create relationships between these new tables and their predecessors through the use of foreign keys

Third Normal Form (3NF)

Third normal form (3NF) goes one large step further:

  • Meet all the requirements of the second normal form
  • Remove columns that are not dependent upon the primary key

Boyce-Codd Normal Form (BCNF or 3.5NF)

The Boyce-Codd Normal Form, also referred to as the “third and half (3.5) normal form”, adds one more requirement:

  • Meet all the requirements of the third normal form
  • Every determinant must be a unique primary key (candidate key)

Fourth Normal Form (4NF)

Finally, fourth normal form (4NF) has one additional requirement:

  • Meet all the requirements of the third normal form
  • A relation is in 4NF if it has no multi-valued dependencies

More info:

Database Normalization Basics

First, second, and third normal form

Database Normalization: First, Second, and Third Normal Forms

Description of the database normalization basics

Video Normalisation Demonstration

Stairway to Database Design Level 9: Normalization

Third Normal Form

James Serra's Blog

James is a big data and data warehousing technology specialist at Microsoft. He is a thought leader in the use and application of Big Data technologies, including MPP solutions involving hybrid technologies of relational data, Hadoop, and private and public cloud. Previously he was an independent consultant working as a Data Warehouse/Business Intelligence architect and developer. He is a prior SQL Server MVP with over 30 years of IT experience. James is a popular blogger (JamesSerra.com) and speaker, having presented at dozens of PASS events including the PASS Business Analytics conference and the PASS Summit. He is the author of the book “Reporting with Microsoft SQL Server 2012”. He received a Bachelor of Science degree in Computer Engineering from the University of Nevada-Las Vegas.


Leave a comment on the original post [www.jamesserra.com, opens in a new window]

Loading comments...