Docsity

Database Normalization - Database Design - Lecture Slides, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Database Normalization - Database Design - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Overview

  • Today we’ll talk about:
    • Database Normalization
      • Data Anomalies Caused by:
        • Update, Insertion, Deletion
    • Brief History/Overview
    • 1 st^ Normal Form
    • 2 nd^ Normal Form
    • 3 rd^ Normal Form
    • Conclusion

Database Normalization

  • The main goal of Database Normalization is to

restructure the logical data model of a

database to:

  • Eliminate redundancy
  • Organize data efficiently
  • Reduce the potential for data anomalies.

Brief History/Overview

  • Database Normalization was first proposed by Edgar F. Codd.
  • Codd defined the first three Normal Forms, which we’ll look into, of the 7 known Normal Forms.
  • In order to do normalization we must know what the requirements are for each of the three Normal Forms that we’ll go over.
  • One of the key requirements to remember is that Normal Forms are progressive. That is, in order to have 3rd^ NF we must have 2nd^ NF and in order to have 2nd^ NF we must have 1st NF.

1 st^ Normal Form

The Requirements

  • The requirements to satisfy the 1 st^ NF:
    • Each table has a primary key: minimal set of attributes which can uniquely identify a record
    • The values in each column of a table are atomic (No multi-value attributes allowed).
    • There are no repeating groups: two columns do not store similar information in the same table.

2 nd^ Normal Form

The Requirements

  • The requirements to satisfy the 2 nd^ NF:
    • All requirements for 1st^ NF must be met.
    • Redundant data across multiple rows of a table must be moved to a separate table. - The resulting tables must be related to each other by use of foreign key.

2 nd^ Normal Form

Students table Example

Registration table

Student# AdvID AdvName AdvRoom

123 123A James 555

124 123B Smith 467

Student# Class#

123 102-

123 104-

124 209-

124 102-8 Docsity.com

3 rd^ Normal Form

Example Students table:

Student table: Advisor table:

Student# AdvID AdvName AdvRoom

123 123A James 555

124 123B Smith 467

Student# AdvID

123 123A

124 123B

AdvID AdvName AdvRoom

123A James 555

123B Smith 467

3 rd^ Normal Form

Students table: Example Cont.

Registration table: Advisor table:

Student# Class#

123 102-

123 104-

124 209-

124 102-

AdvID AdvName AdvRoom

123A James 555

123B Smith 467

Student# AdvID

123 123A

124 123B