Need for 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.
Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
Boyce-Codd NF Takahiko Saito Spring 2005 CS 157A.
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
Jump to first page Normalization Jump to first page Topics n Why normalization is needed n What causes anomalies n What the 4 normal forms are n How.
Normalization of Database Tables
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
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 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 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.
Why Normalization? To Reduce Redundancy to 1.avoid modification, insertion, deletion anomolies 2.save space Goal: One Fact in One Place.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
NORMALIZATION N. HARIKA (CSC).
Chapter 5 Normalization of Database Tables
FUNCTIONAL DEPENDENCIES
Lecture 12 Inst: Haya Sammaneh
Text & Original Presentations
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, 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.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
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.
Database Principles: Fundamentals of Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables Carlos Coronel, Steven.
Normalization of Database Tables
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.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Entity Relationship Model: E-R Modeling 1 Database Design.
3 Spring Chapter Normalization of Database Tables.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
Database Architecture Normalization. Purpose of Normalization A technique for producing a set of relations with desirable properties, given the data requirements.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
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.
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
Normalization (Chapter 2)
Chapter 4: Relational Database Design
Payroll Management System
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Normalization of Database Tables Uploaded by: mysoftbooks.ml
Normalization of DB relations examples Fall 2015
Review of Week 3 Relation Transforming ERD into Relations
Presentation transcript:

Need for Normalization Figure 4.1 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Figure 4.1 Observations PRO_NUM intended to be primary key Table entries invite data inconsistencies Table displays data anomalies Update Modifying JOB_CLASS Insertion New employee must be assigned project Deletion If employee deleted, other vital data lost Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Dependency Diagram (1NF) Figure 4.4 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Data Organization: 1NF (“Flattening” the table) Primary Key is PROJ_NUM, EMP_NUM Figure 4.3 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

1NF Summarized All key attributes defined (non-null) No repeating groups in table All attributes dependent on primary key Consequently all rows unique All this is part of “being relational” Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

2NF Conversion Results PROJECT (PROJ_NUM, PROJ_NAME) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS, CHG_HOUR) ASSIGN (PROJ_NUM, EMP_NUM, HOURS) Figure 4.5 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

2NF Summarized In 1NF Includes no partial dependencies No attribute dependent on a portion of primary key 1NF with singleton primary key always 2NF Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Transitive Dependencies A  C is a transitive dependency if there is a B such that A  B and B  C where A is not functionally dependent on B and A is not functionally dependent on C Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

3NF In 2NF Contains no transitive dependencies outside the primary key To convert to 3NF, project out the dependency: JOB (JOB_CLASS, CHG_HOUR) PROJECT (PROJ_NUM, PROJ_NAME) ASSIGN (PROJ_NUM, EMP_NUM, HOURS) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS) Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Boyce-Codd Normal Form (BCNF) Codd originally did not consider the case where 1. There are 2 or more candidate keys 2. The keys are composite 3. They overlap To be in BCNF, every determinant must be a candidate key Notes: Determinant is attribute on the left of a FD 3NF table with only one candidate key is always in BCNF Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Solutions for problems 1 & 3 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

3NF Table Not in BCNF Figure 4.7 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Decomposition of Table Structure to Meet BCNF Figure 4.8 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Decomposition into BCNF Figure 4.9 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel