You are on page 1of 24

Module 3

Normalization
Module Overview

Fundamentals of Normalization
Normal Form
• Denormalization
Lesson 1: Fundamentals of Normalization

Benefits of Normalization
Keys
Demonstration: Identifying Candidate Keys
• Dependencies
Benefits of Normalization

• More consistent data with fewer anomalies


• Reduced impact when making changes to the
database schema
• An intuitive design that is easy to understand
• Improved performance for OLTP workloads
• Databases that require less storage space
Keys

• A primary key uniquely identifies every row in a


table
• Candidate keys are the potential primary keys for
a table
• Surrogate keys are candidate keys that you can
create when there are no other suitable
candidate keys
Demonstration: Identifying Candidate Keys

• In this demonstration, you will see how to


identify candidate keys in a table
Dependencies
Lesson 2: Normal Form

First Normal Form


Second Normal Form
Third Normal Form
Demonstration: Normalizing to Third Normal Form
Boyce-Codd Normal Form
Fourth Normal Form
• Fifth Normal Form
First Normal Form
Second Normal Form
Third Normal Form
Demonstration: Normalizing to Third Normal Form

In this demonstration, you will see examples of:


• Normalizing to first normal form
• Normalizing to second normal form
• Normalizing to third normal form
Boyce-Codd Normal Form
Fourth Normal Form
Fifth Normal Form
Lesson 3: Denormalization

Introduction to Denormalization
Benefits of Denormalization
Techniques for Denormalizing Databases
• Considerations for Denormalization
Introduction to Denormalization

• Types of relational database schemas include:


• OLTP, typically highly normalized
• Star and snowflake, typically denormalized

• Normalize first, then selectively denormalize


Benefits of Denormalization

• Improved query performance


• Support for reporting applications
• Improved concurrency
• Ease of use
Techniques for Denormalizing Databases

• Adding redundant columns


• Using report tables
• Using duplicate tables
• Using split tables
• Reintroducing repeating data groups
• Using calculated and derived columns
Considerations for Denormalization

• Denormalized databases can be larger


• Denormalizing can increase the number of NULL
values in a database
• Updates must be handled correctly
• The likelihood of data anomalies is much greater
in a denormalized database
• Powerful hardware can negate the benefits of
denormalization
• In-memory technologies improve performance
for normalized databases
• Testing is an essential part of the
denormalization process
Lab: Normalizing Data

Exercise 1: Normalizing to First Normal Form


Exercise 2: Normalizing to Second Normal Form
Exercise 3: Normalizing to Third Normal Form
• Exercise 4: Denormalizing Data

Logon Information
Ensure that the MT17B-WS2016-NAT, 10985C-
MIA-DC, 10985C-MIA-SQL, and 10985C-MIA-CLI
virtual machines are all running, and then log on to
10985C-MIA-CLI as Student with the password
Pa55w.rd.
Estimated Time: 60 minutes
Lab Scenario

The retail company that you work for uses a


spreadsheet to track customer orders, but as the
number of orders increases, the data has become
more difficult to maintain. Management have
decided to switch to a relational database. You
have been charged with designing a new database
schema for the orders data. You have obtained a
reduced copy of the current orders spreadsheet
that contains a small representative sample of the
data; you will use this to help you to design the
schema.
Lab Review

In this lab, you:


• Normalized a data set to first normal form.
• Normalized a data set to second normal form.
• Normalized a data set to third normal form.
• Denormalized a table.
Module Review and Takeaways

In this module, you have seen how to:


• Outline the benefits of normalization and some of
the concepts that underpin it.
• Describe the various levels of normal form.
• Explain the benefits of denormalization and
outline some techniques for denormalization.

You might also like