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
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.
5 Chapter 5 Normalization of Database Tables Example Database Systems: Design, Implementation, and Management, Rob and Coronel Special adaptation for INFS-3200.
NORMALIZATION N. HARIKA (CSC).
Chapter 5 Normalization of Database Tables
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Lecture 12 Inst: Haya Sammaneh
Text & Original Presentations
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220m.htm
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 4 This material was developed by Oregon Health & Science.
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.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
Database Design – Lecture 8
Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management Peter Rob & Carlos Coronel.
Component 4/Unit 6d Topic IV: Design a simple relational database using data modeling and normalization Description and Information Gathering Data Model.
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.
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 Example. Database Systems, 8 th Edition 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures.
Database Systems, 8 th Edition Improving the Design Table structures cleaned up to eliminate initial partial and transitive dependencies Normalization.
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.
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
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.
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
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.
Normalizing Database Designs. 2 Objectives In this chapter, students will learn: –What normalization is and what role it plays in the database design.
Normalization.
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:

Normalization of Database Tables

Topics Role of normalization in the database design process Normal forms 1NF, 2NF, 3NF, BCNF, 4NF Normalization & ER modeling used together for good database design Denormalization

Normalization Process for evaluating/correcting table structures to minimize data redundancies Reduces data anomalies Series of stages called normal forms 1NF, 2NF, 3NF, BCNF, 4NF For many purposes, 3NF is good enough Sometimes denormalization (to a lower normal form) is advised

Example A company manages building projects Charges clients by hours spent on each contract Hourly billing rate depends on employee’s position Report: Table 5.1

Report converted to table

Goals of 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 only on the primary key (or a candidate key) Each table void of insertion, update, deletion anomalies All a product of data redundancy

Conversion to First Normal Form Eliminate any repeating groups They represent multi-valued attributes – bad!!! Eliminate nulls: each repeating group attribute contains an appropriate data value Identify the primary key (PK) Must uniquely identify all attribute values Identify all dependencies Dependencies depicted with a diagram

Dependency Diagram

What is the PK?

Conversion to 1NF 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

Conversion to 2NF Eliminate partial dependencies Only relevant if PK is composite

Conversion to 3NF Eliminate transitive dependencies

Improving the Design Issues to address beyond normalization Evaluate PK assignments Evaluate naming conventions Refine attribute atomicity Identify new attributes Identify new relationships Refine primary keys for granularity Maintain historical accuracy Evaluate derived attributes

Higher-Level Normal Forms Tables in 3NF perform suitably in business transactional databases Higher order normal forms useful on occasion Two special cases of 3NF: Boyce-Codd normal form (BCNF) Fourth normal form (4NF)

Boyce-Codd Normal Form (BCNF) Every determinant in table is a candidate key Has same characteristics as PK, but was not chosen to be primary key When table contains only one candidate key, 3NF and BCNF are equivalent Table can be in 3NF and fail to meet BCNF Happens when a non-key attribute is the determinant of a key attribute

In 3NF but not BCNF

In 3NF but not BCNF PK is STU_ID, STAFF_ID CLASS_CODE STAFF_ID

Fourth Normal Form (4NF) Table is in 4NF when It is in 3NF No multiple sets of multi-valued dependencies Not an issue if tables conform to these rules: All attributes are dependent on PK, and are independent of each other No row contains two or more multi-valued facts about an entity Example – see Fig. 6.10 & 6.11, pp. 196-197

Normalization and Database Design Normalization is part of the design process Proposed entities must meet required normal form before table structures are created Many real-world databases have been improperly designed or burdened with anomalies Normalization is necessary if you are asked to redesign and modify existing databases

Denormalization Creation of normalized relations is important database design goal Processing requirements should also be a goal With normalization, the number of tables expands Joining the larger number of tables reduces system speed Conflicts often resolved through compromises that may include denormalization`