1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

Database Tables and Normalization
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 5 Normalization of Database Tables
4/30/2015 Database Design:Normalization. 4/30/2015 Functional Dependence An attribute (column) B, is functionally dependent on another attribute A if.
Chapter 5 Normalization of Database Tables
Normalization of Database Tables
Need for Normalization
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Concepts of Database Management, 4th Edition, Pratt & Adamski
1 6 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: Normalization.
Normalization of Database Tables
4 Chapter 4 Normalization Hachim Haddouti. 4 Hachim Haddouti, CH4, see also Rob & Coronel 2 In this chapter, you will learn: What normalization is and.
Normalization I.
Normalization of Database Tables
Concepts of Database Management, 4th Edition, Pratt & Adamski
Chapter 5 Normalization of Database Tables
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Daniel AdinugrohoDatabase Programming 1 DATABASE PROGRAMMING Lecture on 29 – 04 – 2005.
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 3 Objectives: Identifying and Eliminating Database.
Lecture 12 Inst: Haya Sammaneh
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Avoiding Database Anomalies
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
Concepts of Database Management Sixth Edition Chapter 5 Database Design 1: Normalization.
Concepts of Database Management, Fifth Edition
Chapter 4 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
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 A Guide to MySQL 2 Database Design Fundamentals.
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.
Normalization. We will take a look at –First Normal Form –Second Normal Form –Third Normal Form There are also –Boyce-Codd, Fourth and Fifth normal forms.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
資料庫正規化 Database Normalization 取材自 AIS, 6 th edition By Gelinas et al.
1 A Guide to MySQL 2 Database Design Fundamentals.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Database Design – Lecture 8
Normalization Transparencies 1. ©Pearson Education 2009 Objectives How the technique of normalization is used in database design. How tables that contain.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
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 Example. Database Systems, 8 th Edition 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures.
Concepts of Database Management Seventh Edition Chapter 5 Database Design 1: Normalization.
1 2 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra.
IST Database Normalization Todd Bacastow IST 210.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Microsoft Access 2010 Chapter 11 Database Design.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
Southern Methodist University CSE CSE 2337 Introduction to Data Management Chapter 5 Part II.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
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.
1 First Normal Form (1NF) Unnormalized table : Contains a repeating group –Eg: from multi-valued attributes –Eg: from many-many relationship Table in 1NF:
Systems Analysis & Design Methods III Classic normalization rules for relational databases III Classic normalization rules for relational databases.
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.
A Guide to SQL, Eighth Edition
Functional Dependencies
Chapter 11 Database Design
Concepts of Database Management Eighth Edition
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Chapter 6 Normalization of Database Tables
Normalization – Part II
Presentation transcript:

1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization

2 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Objectives u Discuss functional dependence u Define first normal form, second normal form, and third normal form u Describe the problems associated with tables (relations) that are not in first normal form, second normal form, or third normal form along with the mechanism for converting to all three

3 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Objectives u Discuss the problems associated with incorrect conversions to third normal form u Define fourth normal form u Describe the problems associated with tables (relations) that are not in fourth normal form and describe the mechanism for converting to fourth normal form

4 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Functional Dependence u Column B is functionally dependent on Column A if A’s value determines a single value for B at a given time u Given A, a single value for B can be determined

5 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Functional Dependence Example Figures Rep Table Where LastName can determine record Rep Table Where LastName cannot determine record

6 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Keys u Column(s) C is primary key for table T if: Property 1: All columns in T are functionally dependent on C Property 2: No subcollection of columns in C (assuming C is a collection of columns and not just a single column) also has Property 1 u Candidate Keys l Column(s) on which all other columns in table are functionally dependent u Alternate Keys l Candidate keys not chosen as primary keys

7 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski First Normal Form (1NF) u Unnormalized table l Contains a repeating group u Table in 1NF l Contains no repeating groups u Removal of repeating groups is starting point in quest for problem-free tables

8 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 1NF Example Figure 5.5 Unnormalized Table

9 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 1NF Example (con’t.) Figure 5.6 Conversion to 1NF

10 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Second Normal Form (2NF) u 1NF Tables may contain problems l Redundancy l Update Anomalies u Update, inconsistent data, additions, deletions u Occur because a column is dependent on a portion of a multi-column primary key u 2NF Table l In 1NF and no nonkey column is dependent on only a portion of the primary key

11 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Dependency Diagram for Orders Figure 5.8

12 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2NF Example Figure 5.9a

13 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2NF Example Figure 5.9b

14 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Third Normal Form (3NF) u 2NF Tables may still contain problems l Redundancy and wasted space l Update Anomalies u Update, inconsistent data, additions, deletions u Occur because a column is dependent on a portion of a multi-column primary key u 3NF Table l In 2NF and the only determinants contained are candidate keys

15 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Customers Dependency Diagram Figure 5.11

16 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 3NF Example Figure 5.12a

17 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 3NF Example Figure 5.12b

18 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Incorrect Decomposition Example Figure 5.13a

19 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Incorrect Decomposition Example Figure 5.13b

20 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2nd Incorrect Decomposition Figure 5.14a

21 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2nd Incorrect Decomposition Figure 5.14b

22 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Fourth Normal Form (4NF) u 3NF Tables may still contain problems l Dependencies l Update Anomalies u Update, additions, deletions u Occur because of multivalued dependencies u 4NF Table l In 3NF and has no multivalued dependencies

23 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Incorrect 4NF Example Figure 5.15

24 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 4NF Example Figure 5.16a

25 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 4NF Example Figure 5.16b

26 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Normal Forms Figure 5.17