Sei sulla pagina 1di 19

Module 3

Normalization
Module 3 Overview

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

• Benefits of Normalization
• 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 Online Transactional
Processing (OLTP) workloads
• INSERT, UPDATE, DELETE operations
• Databases 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- commonly IDENTITY columns
Dependencies
Lesson 2: Normal Form

• First Normal Form


• Second Normal Form
• Third Normal Form
• Boyce-Codd Normal Form
• Fourth Normal Form
• Fifth Normal Form
First Normal Form
Second Normal Form
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:


• Online Transaction Processing (OLTP)
• Typically highly normalized
• Online Analysis Processing (OLAP)
• Star and snowflake, typically denormalized
• Normalize first, then selectively denormalize
Benefits of Denormalization

• Improved READ 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 will 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 3: 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

Potrebbero piacerti anche