Normalization - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Normalization

Description:

Trick (along with skill and costume) is a repeating group ... Trick and Costume are two different 1:n relations that are not directly related to each other. ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 22
Provided by: jackb3
Category:

less

Transcript and Presenter's Notes

Title: Normalization


1
Normalization
  • What is it?
  • It is the process for assigning attributes to
    entities. Normalization reduces data
    redundancies and , by extension, helps eliminate
    the data anomalies that result from those
    redundancies.

2
Unnormalized Data
  • Puppy Number
  • Puppy Name
  • Kennel Code
  • Kennel Name
  • Kennel Location
  • Breeder
  • Breed
  • Trick ID 1n
  • Trick Name 1n
  • Trick Where Learned 1n
  • Skill Level 1n
  • Costume 1n
  • No normalization

3
First Normal Form
  • A relation R is in 1NF if and only if all
    underlying domains contain atomic values only.

4
First Normal Form
  • Eliminate repeating groups
  • Make a separate table for each set of related
    attributes, and give each table a primary key

5
1st Normal Form
  • Trick (along with skill and costume) is a
    repeating group
  • Form new table to hold trick information

6
Second Form Normal
  • A relation R is in 2NF if it is in 1NF and every
    non-key attribute is fully dependent on the
    primary key.

7
Second Form Normal
  • Eliminate Redundant Data
  • If an attribute depends on only part of a
    multi-valued key, remove it to a separate table

8
2nd Normal Form
  • Trick Name is fully dependent on Trick ID
  • Change Trick Table so it only holds information
    dependent on Trick ID
  • Form new table to hold information about the
    Puppy and Trick

9
Third Form Normal
  • A relation R is in 3NF if it is in 2NF and every
    non-key attribute is non-transitively dependent
    on the primary key.
  • A relation R is in 3NF if and only if it is in
    2NF and every determinant is a candidate key.

10
Third Normal Form
  • Eliminate columns not dependant on primary key
  • If attributes do not contribute to a description
    of the key, remove them to a separate table

11
Third Normal Form
  • Kennel Information is not dependent on the puppy
    number

12
Fourth Normal Form
  • A relation R is in 4NF if and only if all
    multi-valued dependencies are functional
    dependencies

13
Fourth Normal Form
  • Isolate Independent Multiple Relationships
  • No table may contain two or more 1n or nn
    relationships that are not directly related

14
Fourth Normal Form
  • Trick and Costume are two different 1n relations
    that are not directly related to each other.
    Separate them into two tables

15
Fifth Normal Form
  • A relation R is in 5NF if and only if every join
    dependency in R is implied by the candidate keys

16
Fifth Normal Form
  • Isolate Semantically related Multiple
    Relationships
  • There may be practical constrains on information
    that justify separating logically related
    many-to-many relationships

17
Fifth Form Normal
18
Normalization (summary)
  • Take projections of original 1NF relation to
    eliminate non-full functional dependencies
  • Take projections of these 2NF relations to
    eliminate transitive functional dependencies
  • Take projections of these 3NF relations to
    eliminate any remaining functional dependencies
    that do not arise from candidate keys

19
Normalization (summary)
  • Take projections of these 3NF relations to
    eliminate multi-dependencies that are not also
    functional dependencies
  • Take projections of these 4NF relations to
    eliminate any remaining join dependencies that
    are not also multi-dependencies

20
Normalization (simplified)
  • The key, the whole key, and nothing but the
    key, so help me Codd.

21
DBAs dirty little secret
  • Normalization is over-valued by those that do it.
  • Normalization is under-valued by those that dont.
Write a Comment
User Comments (0)
About PowerShow.com