5 Chapter 5 Normalization of Database Tables Example Database Systems: Design, Implementation, and Management, Rob and Coronel Special adaptation for INFS-3200.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

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
Normalization of Database Tables
Advanced Data Modeling
Module 2 Designing a Logical Database Model. Module Overview Guidelines for Building a Logical Database Model Planning for OLTP Activity Evaluating Logical.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 6 Advanced Data Modelling
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
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
Entity Relationship Modeling (& Normalization)
Normalization of Database Tables
Need for 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 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.
NORMALIZATION N. HARIKA (CSC).
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Chapter 5 Normalization of Database Tables
Normalization of Database Tables
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 5 Advanced Data Modeling.
Text & Original Presentations
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Avoiding Database 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.
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.
Chapter 8 Data Modeling Advanced Concepts Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
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.
Database Design – Lecture 6 Moving to a Logical Model.
Entity Relationship Model: E-R Modeling 1 Database Design.
3 Spring Chapter Normalization of Database Tables.
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.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
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
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
CSCI 2141 – Intro to Database Systems
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:

5 Chapter 5 Normalization of Database Tables Example Database Systems: Design, Implementation, and Management, Rob and Coronel Special adaptation for INFS-3200

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 2 Database Tables and Normalization Original Data

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 3 Data in 1NF

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 4 Dependency Diagram (1NF) 1NF (PROJ_NUM, EMP_NUM, PROJ_NUM,EMP_NAME, JOB_CLASS, CHG_HOUR, HOURS) Partial Dependencies: (PROJ_NUM -> PROJ_NAME) (EMP_NUM -> EMP_NAME, JOB_CLASS, CHG_HOUR) Transitive Dependencies: (JOB_CLASS -> CHG_HOUR)

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 5 2NF Conversion EMP_NUMPROJ_NUM EMP_NUM Transitive dependency PROJ_NAME EMP_NAME JOB_CLASSCHG_HOUR ASSIGN_HOURS Table name: PROJECT Table name: ASSIGN Table name: EMPLOYEE PROJECT (PROJ_NUM, PROJ_NAME) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS, CHG_HOUR) ASSIGN (PROJ_NUM, EMP_NUM, ASSIGN_HOURS) Transitive Dependencies: (JOB_CLASS -> CHG_HOUR) 1NF 2NF

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 6 3NF Conversion PROJECT (PROJ_NUM, PROJ_NAME) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS) JOB (JOB_CLASS, CHG_HOUR) ASSIGN (PROJ_NUM, EMP_NUM, ASSIGN_HOURS) EMP_NUM PROJ_NUM EMP_NUM Transitive dependency PROJ_NAME EMP_NAME JOB_CLASS CHG_HOUR ASSIGN_HOURS Table name: PROJECT Table name: ASSIGN Table name: EMPLOYEE CHG_HOUR JOB_CLASS Table name: JOB

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 7 Improving the Design 1.Evaluate PK Assignment (meet PK guidelines) 2.Evaluate Naming Conventions 3.Refine Attribute Atomicity (simple, single-valued) 4.Identify New Attributes 5.Identify New Relationships (decompose M:M) 6.Refine Primary Keys (as required for data granularity) 7.Maintain Historical Transactional Accuracy 8.Identify Use of Derived Attributes

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 8 Improving the Design (Job Table) 1.Evaluate PK Assignment Introduce a better suited PK free of semantic content (non- intelligent PK) Add JOB_CODE as surrogate PK. To reduce data entry errors Repeat for other tables (see # 6 – Assign)* 2.Evaluate Naming Conventions –JOB_CLASS is actually a description of the job, change to JOB_DESCRIPTION. –CHG_HOURS should be JOB_CHG_HOUR

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 9 Improving the Design (Employee Table) 3.Refine Attribute Atomicity –Decompose composite attributes into simple attributes –EMP_NAME should be EMP_LNAME EMP_FNAME EMP_INITIAL 4.Identify New Attributes –Add new attributes that describe real world entity characteristics –EMP_HIREDATE

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 10 Improving the Design (Project Table) 5.Identify New Relationships –Add new relationships as required by business rules. A project is managed by an employee, an employee can be the manager of only one project. Add EMP_NUM as FK in PROJECT

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 11 Improving the Design (Assign Table) 4.Identify new attributes –Add ASSIGN_DATE 6.Refine Primary Keys –Consider the “granulity” of the data being represented in order to determine the PK. –Can an employee have multiple hours worked entries for a given day in a given project? –If yes, add ASSIGN_NUM as surrogate PK. 7.Maintain Historical Transaction Accuracy –Add ASSIGN_CHG_HOUR 8.Identify Use of Derived Attributes –Add ASSIGN_CHARGE

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 12 Final Normalized Design

5 Database Systems: Design, Implementation, & Management, Rob & Coronel 13 Limitations of System Assigned PK Surrogate PK ensures that each row has an unique ID, not that the row’s dependent values are unique. JOB_CODE system assigned PK We still could have duplicate values: –511 Programmer –512 Programmer Clearly, entries are duplicated! To ensure unique values we must have create an unique index on all candidate keys. –Unique index on JOB_DESCRIPTION This still will still not avoid data entry errors! –513 Progranmer 35.75