Normalization: A Workshop for Everybody Pt. 2

14
Postgresql East - 2010 Philadelphia, PA Databases – A Historical Perspective

description

Brent Friedman- Three hour workshop format, 30 minutes or so on history, trends, quick review of normalization, 45 minutes on a normalization walk-through including everyone, then break into small teams (3-6 ppl) to do a 'normalization challenge' on a real world practical problem

Transcript of Normalization: A Workshop for Everybody Pt. 2

Page 1: Normalization: A Workshop for Everybody Pt. 2

Postgresql East - 2010

Philadelphia, PA

Databases – A Historical Perspective

Page 2: Normalization: A Workshop for Everybody Pt. 2

Part Two

Why be normal?

Databases – A Historical Perspective

Page 3: Normalization: A Workshop for Everybody Pt. 2

•The Normal Forms

• Normalization Workshop

Databases – A Historical Perspective

Page 4: Normalization: A Workshop for Everybody Pt. 2

Normal Forms

The truth,The whole truth,

And nothing but the truth.

Databases – A Historical Perspective

Page 5: Normalization: A Workshop for Everybody Pt. 2

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

organized database:1. Eliminate duplicative columns

from the same table.2. Create separate tables for each group of related data and identify each row with a unique column

(the primary key).

Databases – A Historical Perspective

Page 6: Normalization: A Workshop for Everybody Pt. 2

Second Normal Form 2NF: 1. Remove subsets of data

that apply to multiple rows of a table and place them in

separate tables. 2. Create relationships

between these new tables and their predecessors

through the use of foreign keys.

Databases – A Historical Perspective

Page 7: Normalization: A Workshop for Everybody Pt. 2

Third Normal Form:

1. Meet the requirements of both 1NF and 2NF

2. Remove columns that are not fully dependent upon the

primary key.

Databases – A Historical Perspective

Page 8: Normalization: A Workshop for Everybody Pt. 2

4th and 5th Normal Form –

These are data purity abstractions which are not

routinely used in production databases.

Databases – A Historical Perspective

Page 9: Normalization: A Workshop for Everybody Pt. 2

6th Normal Form –

Found only in alien databases.

Databases – A Historical Perspective

Page 10: Normalization: A Workshop for Everybody Pt. 2

"The key, the whole key, and nothing but the key, so help me

Codd."

Databases – A Historical Perspective

Page 11: Normalization: A Workshop for Everybody Pt. 2

And, a note about data

warehousing…

De-normalization is a key tenet of data warehousing.

Databases – A Historical Perspective

Page 12: Normalization: A Workshop for Everybody Pt. 2

BRAINSTORM!!!

Databases – A Historical Perspective

Page 13: Normalization: A Workshop for Everybody Pt. 2

Questions?Comments?

Databases – A Historical Perspective

Page 14: Normalization: A Workshop for Everybody Pt. 2

EndOf

PartTwo

Databases – A Historical Perspective