Chapter 5 Normalization of Database Tables

Slides:



Advertisements
Similar presentations
Normalization of Database Tables
Advertisements

Chapter 5 Normalization of Database Tables
Database Tables and Normalization
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
DBS201: Introduction to Normalization
1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Chapter 5 Normalization of Database Tables
Normalization of Database Tables Special adaptation for INFS-3200
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.
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 of Database Tables
Normalization of Database Tables
Database Systems: Design, Implementation, and Management Tenth Edition
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.
Normalization A337. A337 - Reed Smith2 Structure What is a database? ◦ Tables of information  Rows are referred to as records  Columns are referred.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
NORMALIZATION N. HARIKA (CSC).
Normalization. Introduction Badly structured tables, that contains redundant data, may suffer from Update anomalies : Insertions Deletions Modification.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Text & Original Presentations
INSS 6511 Chapter 5 Normalization An Normalization example.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220m.htm
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
CMPE 226 Database Systems September 16 Class Meeting Department of Computer Engineering San Jose State University Fall 2015 Instructor: Ron Mak
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
Database Systems: Design, Implementation, and Management Tenth 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.
The Relational Model and Normalization R. Nakatsu.
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.
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Database Design – Lecture 8
Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management Peter Rob & Carlos Coronel.
Database Principles: Fundamentals of Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables Carlos Coronel, Steven.
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.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
E-R Modeling: Table Normalization. Normalization of DB Tables Normalization ► Process for evaluating and correcting table structures determines the optimal.
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.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
5 1 Normalization of Database Tables. 5 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures to minimize.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
INSS 6511 Chapter 5 Normalization An Normalization example.
Normalizing Database Designs. 2 Objectives In this chapter, students will learn: –What normalization is and what role it plays in the database design.
Chapter 5: Relational Database Design
Chapter 4: Relational Database Design
Functional Dependencies
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Chapter 9 Normalizing Database Designs
Chapter 6 Normalization of Database Tables
Normalization A337.
Normalization of Database Tables Uploaded by: mysoftbooks.ml
DATABASE DESIGN & DEVELOPMENT
Review of Week 3 Relation Transforming ERD into Relations
Presentation transcript:

Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables

Objectives In this chapter, you will learn: What normalization is and what role it plays in the database design process About the normal forms 1NF, 2NF, 3NF, BCNF How normal forms can be transformed from lower normal forms to higher normal forms That normalization and ER modeling are used concurrently to produce a good database design That some situations require denormalization to generate information efficiently Database Systems, 8th Edition

5.1 Database Tables and Normalization Process for evaluating and correcting table structures to minimize data redundancies Reduces data anomalies Works through a series of stages called normal forms: First normal form (1NF) Second normal form (2NF) Third normal form (3NF) Database Systems, 8th Edition

Database Tables and Normalization (continued) 2NF is better than 1NF; 3NF is better than 2NF For most business database design purposes, 3NF is as high as needed in normalization Highest level of normalization is not always most desirable Denormalization produces a lower normal form Price paid for increased performance is greater data redundancy Database Systems, 8th Edition

5.2 The Need for Normalization Example: company that manages building projects Charges its clients by billing hours spent on each contract Hourly billing rate is dependent on employee’s position Periodically, report is generated that contains information such as displayed in Table 5.1 Database Systems, 8th Edition

Table 5.1 A Sample Report Layout

Figure 5.1 Tabular representation of the report format

The Need for Normalization (continued) Structure of data set in Figure 5.1 does not handle data very well Table structure appears to work; report generated with ease Report may yield different results depending on what data anomaly has occurred Relational database environment suited to help designer avoid data integrity problems Check p. 155 Database Systems, 8th Edition

5.3 The Normalization Process Each table represents a single subject No data item will be unnecessarily stored in more than one table All attributes in a table are dependent on the primary key Each table void of insertion, update, deletion anomalies Database Systems, 8th Edition

Database Systems, 8th Edition

The Normalization Process (continued) Objective of normalization is to ensure all tables in at least 3NF Higher forms not likely to be encountered in business environment Normalization works one relation at a time Progressively breaks table into new set of relations based on identified dependencies Database Systems, 8th Edition

Table 5.3 Functional Dependency Concepts Database Systems, 8th Edition

Conversion to First Normal Form Repeating group Group of multiple entries of same type exist for any single key attribute occurrence Relational table must not contain repeating groups Normalizing table structure will reduce data redundancies Normalization is three-step procedure Database Systems, 8th Edition

Conversion to First Normal Form (continued) Step 1: Eliminate the Repeating Groups Eliminate nulls: each repeating group attribute contains an appropriate data value Step 2: Identify the Primary Key Must uniquely identify attribute value New key must be composed Step 3: Identify All Dependencies Dependencies depicted with a diagram Database Systems, 8th Edition

Figure 5.2 A table in First Normal Form

Conversion to First Normal Form (continued) Dependency diagram: Depicts all dependencies found within given table structure Helpful in getting bird’s-eye view of all relationships among table’s attributes Makes it less likely that you will overlook (忽略) an important dependency Database Systems, 8th Edition

Database Systems, 8th Edition

Conversion to First Normal Form (continued) First normal form describes tabular format in which: All key attributes are defined There are no repeating groups in the table All attributes are dependent on primary key All relational tables satisfy 1NF requirements Some tables contain partial dependencies Dependencies based on part of the primary key Should be used with caution Database Systems, 8th Edition

Conversion to Second Normal Form Step 1: Write Each Key Component on a Separate Line Write each key component on separate line, then write original (composite) key on last line Each component will become key in new table Step 2: Assign Corresponding Dependent Attributes Determine those attributes that are dependent on other attributes At this point, most anomalies have been eliminated Database Systems, 8th Edition

Database Systems, 8th Edition

Conversion to Second Normal Form (continued) Table is in second normal form (2NF) when: It is in 1NF and It includes no partial dependencies: No attribute is dependent on only portion of primary key Database Systems, 8th Edition

Conversion to Third Normal Form Step 1: Identify Each New Determinant For every transitive dependency, write its determinant as PK for new table Determinant: any attribute whose value determines other values within a row Step 2: Identify the Dependent Attributes Identify attributes dependent on each determinant identified in Step 1 Identify dependency Name table to reflect its contents and function Database Systems, 8th Edition

Conversion to Third Normal Form (continued) Step 3: Remove the Dependent Attributes from Transitive Dependencies Eliminate all dependent attributes in transitive relationship(s) from each of the tables Draw new dependency diagram to show all tables defined in Steps 1–3 Check new tables as well as tables modified in Step 3 Each table has determinant No table contains inappropriate dependencies Database Systems, 8th Edition

Database Systems, 8th Edition

Conversion to Third Normal Form (continued) A table is in third normal form (3NF) when both of the following are true: It is in 2NF It contains no transitive dependencies Database Systems, 8th Edition