BTM 382 Database Management Chapter 6: Normalization of Database Tables Chitu Okoli Associate Professor in Business Technology Management John Molson School.

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.
Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Normalization of Database Tables Special adaptation for INFS-3200
Normalization of Database Tables
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and Normalization.
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
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.
BTM 382 Database Management Chapter 1: Database systems
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
NORMALIZATION N. HARIKA (CSC).
BTM 382 Database Management Chapter 4: Entity Relationship (ER) Modeling Chitu Okoli Associate Professor in Business Technology Management John Molson.
Chapter 3 The Relational Model and Normalization
Chapter 5 Normalization of Database Tables
Lecture 12 Inst: Haya Sammaneh
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
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
Fundamentals/ICY: Databases 2013/14 Week 10 –Monday –Normalization, contd John Barnden Professor of Artificial Intelligence School of Computer Science.
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Chapter 4 The Relational Model and Normalization.
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.
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.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
BTM 382 Database Management Chapter 7 Introduction to Structured Query Language (SQL) Chitu Okoli Associate Professor in Business Technology Management.
BTM 382 Database Management Chapter Writing optimized SQL queries Chitu Okoli Associate Professor in Business Technology Management John Molson.
Chapter 10 Normalization Pearson Education © 2009.
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.
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.
Database Systems, 8 th Edition Improving the Design Table structures cleaned up to eliminate initial partial and transitive dependencies Normalization.
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.
Normalization ACSC 425 Database Management Systems.
Database Architecture Normalization. Purpose of Normalization A technique for producing a set of relations with desirable properties, given the data requirements.
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.
BTM 382 Database Management Chapter 5: Advanced Data Modeling
BTM 382 Database Management Chapter 8 Advanced SQL Chitu Okoli Associate Professor in Business Technology Management John Molson School of Business, Concordia.
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
BTM 382 Database Management Chapter 13: Business intelligence and data warehousing Chapter 14-4: Data analytics Chitu Okoli Associate Professor in Business.
Chapter 4: Relational Database Design
BTM 382 Database Management Chapter 1: Database systems
Chapter 6 Normalization of Database Tables
Normalization A337.
DATABASE DESIGN & DEVELOPMENT
Review of Week 3 Relation Transforming ERD into Relations
Presentation transcript:

BTM 382 Database Management Chapter 6: Normalization of Database Tables Chitu Okoli Associate Professor in Business Technology Management John Molson School of Business, Concordia University, Montréal 1

Problems with unnormalized tables Needless redundancy, hence insert, update and delete anomalies (inconsistencies) Data updates are less efficient because tables are larger Indexing is more cumbersome No simple strategies for creating views (virtual tables) 2

Understand dependencies for normalization: Functional dependency Functional dependency: A→B or (A,B)→(C,D) –B is functionally dependent on A means that knowing A will therefore give you the correct value of B –E.g. Project.ID → Project.Name –Also called determination: “A determines B” Full functional dependency: (A,B)→C where A ↛ C and B ↛ C –When all the attributes in a key are required for the determination (none is optional) –E.g. (Project.ID, Project.Manager) → Project.Name Project.Manager is optional—this is not a full functional dependency –E.g. (Project.Manager, Project.StartDate) → Project.Name This is a full functional dependency, assuming a manager can launch no more than one project on a given date 3

Understand dependencies for normalization: Repeating group = multivalued attribute Multivalued dependency Repeating group = multivalued attribute –Attribute whose values contain multiple values (a list or array of values), instead of a single value –Illegal in the relational model; troublesome for normalization if you don’t catch it Functional dependency: A→B Multivalued dependency: A→B1/B2/B3/…/Bn –Instead of determining just one value of B in a table, A determines multiple values at the same time –E.g. Project.ID → Project.EmployeeID –Usually indicates a problem with normalization 4

Understand dependencies for normalization: Partial and transitive dependencies Partial dependency: (A,B)→(C,D) and B→C –(A,B) is a candidate key (e.g. primary key) –C doesn’t need both A and B to determine it; it only needs B –E.g. (Project.ID,Project.ManagerID) → Project.Name and Project.ID → Project.Name Transitive dependency: A→(B,C) and B→C –A is a candidate key Technically speaking, a transitive dependency requires that B and C not be part of any candidate key. However, if you expand the meaning to include even if they are part of the key, then you will avoid BCNF automatically –A determines C, but so does B, even though B is not a candidate key –E.g. Project.ID → (Project.Client,Project.Location) and Project.Client → Project.Location 5

Summary of attaining normal forms 1NF: Primary key identified and no multivalued attributes –Legitimate primary key selected (unique identifying key) –Only one value per table cell; no lists/arrays (multivalued attributes) in any table cell 2NF: 1NF minus partial dependencies –All dependencies are fully functional –(A,B)→C where A ↛ C and B ↛ C 3NF/BCNF: 2NF minus transitive dependencies –Only a candidate key determines any attribute –If A→(B,C), then B ↛ C –There is a technical distinction between 3NF and BCNF, but if you keep this rule, then you take care of both 3NF and BCNF 4NF: BCNF minus multivalued dependencies –Each row strictly describes just one entity –Only a problem if you missed multivalued attributes in 1NF DKNF, 5NF, 6NF –relatively rare and often not worth the trouble normalizing 6

Dependency diagram: Basic tool for normalization Depicts all dependencies found in a given table structure Gives bird’s-eye view of all relationships among table’s attributes Makes it less likely that you will overlook an important dependency 7

8

9

3NF vs BCNF BCNF is only an issue because of poor selection of primary key for 1NF step Removing dependencies resolves table into BCNF 10

Fixing 4NF problem The only reason a table might be in 3NF/BCNF but not in 4NF is because two originally multivalued attributes existed at 1NF stage Two multivalued attributes should always be placed in separate tables, as the solution shows 11

Denormalization Although normalization is important, processing speed and efficiency is also important in database design 12

Sources Most of the slides are adapted from Database Systems: Design, Implementation and Management by Carlos Coronel and Steven Morris. 11th edition (2015) published by Cengage Learning. ISBN 13: Database Systems: Design, Implementation and Management Other sources are noted on the slides themselves 13