Normalization Copyright © 1999 Patrick McDermott College of Alameda

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2003 Dragomir R. Radev.
Athabasca University Under Development for COMP 200 Gary Novokowsky
Normalization of Database Tables
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 COS 346 Day 5.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
Normalization of Database Tables
Database Normalization Il-Han Yoo CS 157A Professor: Sin-Min Lee.
Normalization of Database Tables
Normalization of Database Tables
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
Chapter 5 Normalization of Database Tables
Project and Data Management Software
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
NORMALIZATION N. HARIKA (CSC).
Normalization II. Boyce–Codd Normal Form (BCNF) Based on functional dependencies that take into account all candidate keys in a relation, however BCNF.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Normalization Quiz Tao Li Grant Horntvedt. 1. Which of the following statements is true: a. Normal forms can be derived by inspecting the data in various.
Week 6 Lecture Normalization
Lecture 12 Inst: Haya Sammaneh
Chapter 5 The Relational Model and Normalization David M. Kroenke Database Processing © 2000 Prentice Hall.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
IT420: Database Management and Organization Normalization 31 January 2006 Adina Crăiniceanu
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 4 This material was developed by Oregon Health & Science.
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
Database Systems: Design, Implementation, and Management Tenth Edition
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Concepts of Database Management, Fifth Edition
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables.
Normalization. Learners Support Publications 2 Objectives u The purpose of normalization. u The problems associated with redundant data.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
1 5 Normalization. 2 5 Database Design Give some body of data to be represented in a database, how do we decide on a suitable logical structure for that.
What's a Database A Database Primer Let’s discuss databases n Why they are hard n Why we need them.
By Abdul Rashid Ahmad. E.F. Codd proposed three normal forms: The first, second, and third normal forms 1NF, 2NF and 3NF are based on the functional dependencies.
Database Design – Lecture 8
Component 4/Unit 6d Topic IV: Design a simple relational database using data modeling and normalization Description and Information Gathering Data Model.
Normalization of Database Tables
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
Data Analysis Improving Database Design. Normalization The process of transforming a data model into a flexible, stable structure. Reduces anomalies Anomaly.
Normalization. 2 u Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data,
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
Normalization.
Normalization and Other Data Modeling Methods There are many paths to the top of the mountain but the view is always the same Chinese proverb.
NORMALIZATION. What is Normalization  The process of effectively organizing data in a database  Two goals  To eliminate redundant data  Ensure data.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
Copyright © Curt Hill Schema Refinement II 2 nd NF to 3 rd NF to BCNF.
Logical Database Design and Relational Data Model Muhammad Nasir
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
MS Access. Most A2 projects use MS Access Has sufficient depth to support a significant project. Relational Databases. Fairly easy to develop a good user.
Normal Forms 1NF – A table that qualifies as a relation is in 1NF. (Back)(Back) 2NF – A relation is in 2NF if all of its nonkey attributes are dependent.
Revised: 2 April 2004 Fred Swartz
Normalization Karolina muszyńska
A brief summary of database normalization
Normal Forms.
Database solutions The process of normalization Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms:
Sampath Jayarathna Cal Poly Pomona
Presentation transcript:

Normalization Copyright © 1999 Patrick McDermott College of Alameda

Eliminate the Redundancy The “Who Cares?” Test Ben Franklin, DBA John McCoy Hatter Fine Hats Made and Sold Redundant & Superfluous

For Each and Every Not Redundant At the Right level Passes The “Who Cares?” Test Usual goal is 3NF, though there are others –BCNF: Boyce/Codd NF –4NF –5NF I Saw the Figure 5 in Gold Charles Demuth c. 1928

Functional Dependencies If you know Key x, you can determine attribute Y x  Y

1NF (First Normal Form ) 2NF (Second Normal Form 3NF (Third Normal Form BCNF (Boyce-Codd NF) 4NF (Fourth Normal Form) 5NF (Fifth Normal Form) Normal Forms

Primary Key Unique –At any time –Across Time –Forever & Always Always –Mandatory –Even if optional, it’s mandatory. –You never want anything important hidden!

1NF 1. Reduce entities to first normal form (1NF) by removing repeating or multivalued attributes to another, child entity. First normal form (1NF) requires that each entity have a fixed number of attributes, each with a unique meaning and name. You achieve first normal form in by removing to a child entity any repeating or multivalued attributes, thereby organizing the data as “flat” structures.

2NF 2. Reduce 1NF entities to second normal form (2NF) by removing attributes that are not dependent on the whole primary key. Second normal form (2NF) requires that each nonkey attribute in a first normal form entity depend on the entire primary key. You achieve second normal form by removing to a parent entity any attributes dependent on only a subset of the primary key.

Trivial 2NF If all the columns in the table are part or the key It has a single column primary key Can add a synthetic key to get to 2NF BUT there will be a transitive dependency, you’ll need to get rid of for 3NF

3NF 3. Reduce 2NF entities to third normal form (3NF) by removing to a parent entity attributes that depend on other, nonkey attributes. Third normal form (3NF) requires that each nonkey attribute within a second normal form entity depend on the entire primary key and nothing other than the primary (and alternate) keys. You achieve third normal form by removing to a parent entity any attributes exhibiting transitive dependencies (i.e., nonkey attributes that depend on other nonkey attributes, where these other attributes are not alternate keys).

1NF-3NF First NF: Each item is Atomic –No Repeating Fields Second NF: In 1NF and Each item relates to the Key Third NF: In 2NF and No item is a fact about another item The Key The whole Key And nothing but the Key So help me Codd

Fog Warning “In nearly all logical data models, reaching third normal form is sufficient and is equivalent to reaching Boyce/Codd normal form, fourth normal form, and fifth normal form. Thus, if you are confused about levels beyond third normal form, do not worry! The highest three levels are minutely more desirable and need be attempted only by the advanced design analyst.” —Fleming & von Halle, Handbook of Relational Database Design The Fog Warning Winslow Homer c. 1885

BCNF 3½ Reduce 3NF entities to Boyce/Codd normal form (BCNF) by ensuring that they are in 3NF for any feasible choice of candidate key as primary key. Boyce/Codd normal form (BCNF) requires that all attributes depend on only the full candidate keys (primary and alternate keys) and do not depend on any subset of a candidate key. You achieve Boyce/Codd normal form by assuring that an entity is in third normal form for any feasible choice of candidate key as primary key. (For many logical data models, third normal form is equivalent to Boyce/Codd normal form.)

4NF 4. Reduce BCNF entities to fourth normal form (4NF) by removing any independently multivalued components of the primary key to two new parent entities. Retain the original (now child) entity only if it contains other, nonkey attributes. Fourth normal form (4NF) requires that the primary key of a third normal form entity contain no independently multivalued attributes. You achieve fourth normal form by removing any pair of such attributes to two new parent entities. (Many data analysts attain fourth normal form instinctively in the process of achieving third normal form.)

5NF— a.k.a Projection/Join PJNF 5. Reduce 4NF entities to fifth normal form (5NF) by removing pairwise cyclic dependencies (appearing within composite primary keys with three or more component attributes) to three or more new parent entities. Fifth normal form (5NF) requires that the primary key of a fourth normal form entity contain no pairwise cyclic redundancies. A cyclic redundancy occurs in a composite primary key of three or more attributes (A, B, C) if whenever entity occurrences (A1, B1, C2), (A2, B1, C1) and (A1, B2, C1) occur, then (A1, B1, C1) also is present.