Concepts of Database Management, Fifth Edition

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
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
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
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
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.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Normalization Rules for Database Tables Northern Arizona University College of Business Administration.
Chapter 5 Normalization of Database Tables
Chapter 4: Logical Database Design and the Relational Model (Part II)
Week 6 Lecture Normalization
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.
Database Management COP4540, SCS, FIU Relation Normalization (Chapter 14)
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.
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.
CORE 2: Information systems and Databases NORMALISING DATABASES.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
1 A Guide to MySQL 2 Database Design Fundamentals.
Chapter 10 Normalization Pearson Education © 2009.
Database Design – Lecture 8
Database Principles: Fundamentals of Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables Carlos Coronel, Steven.
Normalization of Database Tables
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
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.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
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
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
A Guide to SQL, Eighth Edition
Normalization Karolina muszyńska
Functional Dependencies
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
Normalization.
Presentation transcript:

Concepts of Database Management, Fifth Edition Chapter 5: Database Design 1: Normalization

Objectives Discuss functional dependence Discuss primary keys Define first normal form, second normal form, and third normal form 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 Concepts of Database Management

Objectives Discuss the problems associated with incorrect conversions to third normal form Define fourth normal form Describe the problems associated with tables (relations) that are not in fourth normal form and describe the mechanism for converting to fourth normal form Understand how normalization is used in the database design process Concepts of Database Management

Normalization Normalization process – enables you to identify the existence of potential problems, called updating anomalies, in the design of a relational database Normal form – possesses a certain desirable collection of properties Concepts of Database Management

Figure 5.1: Premiere Products Data Concepts of Database Management

Functional Dependence Column B is functionally dependent on Column A if A’s value determines a single value for B at a given time Given A, a single value for B can be determined Concepts of Database Management

Functional Dependence Concepts of Database Management

Functional Dependence Example Figures 5.3-5.4: Functional Dependence Example Rep Table Where LastName can determine record Rep Table Where LastName cannot determine record Concepts of Database Management

Keys Column(s) C is primary key for table T if: Candidate Keys 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 Candidate Keys Column(s) on which all other columns in table are functionally dependent Alternate Keys Candidate keys not chosen as primary keys Concepts of Database Management

First Normal Form (1NF) Unnormalized table Table in 1NF Contains a repeating group Table in 1NF Contains no repeating groups Removal of repeating groups is starting point in quest for problem-free tables Concepts of Database Management

Figure 5.5: 1NF Example Unnormalized Table Concepts of Database Management

Figure 5.6: 1NF Example (con’t.) Conversion to 1NF Concepts of Database Management

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

Figure 5.7: Second Normal Form Concepts of Database Management

Update Anomalies Update Inconsistent data Additions Deletions Information is in multiple rows, difficult to update Inconsistent data Because of the duplication, a row that is not updated causes inconsistency Additions Dummy records are required to add new unused dependent rows Deletions Nonkey column (nonkey attribute) – when a column is not a part of the primary key Concepts of Database Management

Dependency Diagram Dependency diagram – uses arrows to indicate all the functional dependencies present in a table Partial dependencies – dependencies only on a portion of the primary key Concepts of Database Management

Dependency Diagram for Orders Figure 5.8: Dependency Diagram for Orders Concepts of Database Management

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

Figure 5.9: 2NF Example Concepts of Database Management

Figure 5.10: Sample Customer Data Concepts of Database Management

Customers Dependency Diagram Figure 5.11: Customers Dependency Diagram Concepts of Database Management

Incorrect Decomposition Decomposition must take place according to that described for 3NF Even though you may decompose a table, you run the risk of splitting the functional dependence across different tables Concepts of Database Management

Figure 5.12: 3NF Example Concepts of Database Management

Figure 5.13: Incorrect Decomposition Example Concepts of Database Management

Fourth Normal Form (4NF) 3NF Tables may still contain problems Dependencies Update Anomalies Update, additions, deletions Occur because of multivalued dependencies 4NF Table In 3NF and has no multivalued dependencies Concepts of Database Management

Figure 5.15: Incorrect 4NF Example Concepts of Database Management

Figure 5.16a: 4NF Example Concepts of Database Management

Figure 5.17: Normal Forms Concepts of Database Management

Summary Normalization is a process of optimizing databases to prevent update anomalies Normalization attempts to correct update issues by eliminating duplication Duplication also creates inconsistency Insertions can violate database integrity if the database is not normalized Deletions can violate database integrity if the database is not normalized Concepts of Database Management

Summary (con’t.) Normal Forms – First (1NF), Second (2NF), Third(3NF), and Fourth(4NF) 1NF has no repeating groups 2NF is in 1NF and no non-key column is dependent on only a portion of the primary key 3NF is in 2NF and the only determinants are candidate keys 4NF is in 3NF and has no multivalued dependencies Concepts of Database Management