Copyright Ó Oracle Corporation, 1998. All rights reserved. Normalization Use the student note section below for further explanation of the slide content.Use.

Slides:



Advertisements
Similar presentations
Database Design Lessons 2 & 3 Database Models, Entities, Relationships.
Advertisements

Database Tables and Normalization
Normalization Rules for Database Tables
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
First Normal Form Second Normal Form Third Normal Form
ER Modeling Case Studies
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Concepts of Database Management Seventh Edition Chapter 6 Database Design : ERD Model.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Module 2 Designing a Logical Database Model. Module Overview Guidelines for Building a Logical Database Model Planning for OLTP Activity Evaluating Logical.
Normalisation Ensuring data integrity in database design 1.
Athabasca University Under Development for COMP 200 Gary Novokowsky
Modeling the Data: Conceptual and Logical Data Modeling
Advanced Data Modeling. 2 Why Needs A Database  To maintain consistency and integrity in your data by reducing redundancy and eliminating anomalies via.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Entity-Relationship Model and Diagrams (continued)
The Relational Database Model:
Lecture 3 :Database Analysis and Design (II)
Data Modeling 1 Yong Choi School of Business CSUB.
Entity-Relationship Design
Introduction to Databases
Copyright © 2016 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Yong Choi School of Business CSUB
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 1.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Normalization Rules for Database Tables Northern Arizona University College of Business Administration.
Chapter 5 Normalization of Database Tables
Entity Relationship Diagrams
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Concepts and Terminology Introduction to Database.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
Database Normalization Lynne Weldon July 17, 2000.
Database Design Principles – Lecture 3
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
1 Information Retrieval and Use Data Analysis & Data Modeling, Relational Data Analysis and Logical Data Modeling Geoff Leese September 2009.
1 A Guide to MySQL 2 Database Design Fundamentals.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Description and exemplification of entity-relationship modelling.
Section 04 Lesson 01 Introduction to the Database
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
Database Design – Lecture 6 Moving to a Logical Model.
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
Copyright Ó Oracle Corporation, All rights reserved. Assign Unique Identifiers A Unique Identifier (UID) is any combination of attributes and/or.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Data modeling Process. Copyright © CIST 2 Definition What is data modeling? –Identify the real world data that must be stored on the database –Design.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Detailed Data Modeling. Outline Data Modeling Modeling Constructs –Entities –Relationships –Cardinality Model Basic Rules Advanced Rules Prototyping Process.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Microsoft Access 2010 Chapter 11 Database Design.
Lecture 4: Logical Database Design and the Relational Model 1.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
DATA MODELING AND DATABASE DESIGN
Intro to MIS – MGS351 Relational Database Design
Payroll Management System
Entity Relationship Model
DATA MODELING AND DATABASE DESIGN
Presentation transcript:

Copyright Ó Oracle Corporation, All rights reserved. Normalization Use the student note section below for further explanation of the slide content.Use the student note section below for further explanation of the slide content. Use your mouse to resize the content pane and read all of the student note section.Use your mouse to resize the content pane and read all of the student note section.

Copyright Ó Oracle Corporation, All rights reserved. - EMPLOYEE name number phone address department name department number salary gender project name project code marital status hire date birth date start date Data Normalization First Normal Form - a data structure that contains no repeating groups or multiple fields. First Normal Form - a data structure that contains no repeating groups or multiple fields. - Second Normal Form - a data structure in which each non-UID attribute is dependent upon all of its UID, and not just part of it. - Second Normal Form - a data structure in which each non-UID attribute is dependent upon all of its UID, and not just part of it. - Third Normal Form - a data structure in which each non-UID attribute is dependent upon only the UID, and not something else. - Third Normal Form - a data structure in which each non-UID attribute is dependent upon only the UID, and not something else.

Copyright Ó Oracle Corporation, All rights reserved. EMPLOYEE name number phone address department name department number salary gender project name project code marital status hire date birth date start date number project name project code start date # #### EMPLOYEE Optionality of relationship depends on optionality of removed attributes Always mandatory First Normal Form Pull out each repeating group, bring the UID with it, and Pull out each repeating group, bring the UID with it, and add at least one attribute to the UID of the new data set. add at least one attribute to the UID of the new data set. PROJECT

Copyright Ó Oracle Corporation, All rights reserved. EMPLOYEE name number phone address department name department number salary gender marital status hire date birth date 4 number project name project code start date # #### project name project code # EMPLOYEE Optionality of relationship should be verified after relationship names are added Always mandatory Second Normal Form Pull out each attribute that is not dependent on the entire UID, bringing with it that part of the UID upon which it is dependent. This form of Normal only operates against data sets (entities) that have multiple attribute UIDs. Pull out each attribute that is not dependent on the entire UID, bringing with it that part of the UID upon which it is dependent. This form of Normal only operates against data sets (entities) that have multiple attribute UIDs. PROJECT ASSIGNMENT

Copyright Ó Oracle Corporation, All rights reserved. EMPLOYEE name number phone address department name department number salary gender marital status hire date birth date 4444 number project code start date # #### project name project code # EMPLOYEE Optionality of relationship should be verified after relationship names are added department name department number # Optionality of relationship depends on optionality of removed attributes, degree to be verified DEPARTMENT Third Normal Form PROJECT ASSIGNMENT

Copyright Ó Oracle Corporation, All rights reserved. Normalize During Data Modeling CLIENT #* identifier CONTACT #* date contacted o location o location o result o result for the subject of CLIENT #* identifier * date contacted * date contacted Ensure a 3NF tale design by following the rules of data modeling. First Normal Form Rule A table must contain no repeating groups. Corresponding Data Modelling Rule All attributes must be single-valued. The attribute date contacted has multiple values, therefore the entity CLIENT is not in 1NF. Create an additional entity CONTACT with a M:1 relationship to CLIENT. Create an additional entity and 1:M relationship to ensure 1NF.

Copyright Ó Oracle Corporation, All rights reserved. Normalize During Data Modeling (cont) ACCOUNTBANK #* number * name * name #* number * balance * balance * date opened * date opened * bank location * bank location managed by the manager of ACCOUNTBANK #* number * name * name * bank location * bank location #* number * balance * balance * date opened * date opened managed by the manager of Validate each attribute's dependence upon its entity ’ s entire UID. Second Normal Form Rule Every non-key column must be dependent upon all the parts of the primary key. Corresponding Data Modeling Rule An attribute must be dependent upon its entity ’ s entire unique identifier. The attribute bank location is not dependent upon the UID of ACCOUNT. It is dependent upon the UID of BANK. Move the attribute and place it where it depends upon the the UID of its entity.

Copyright Ó Oracle Corporation, All rights reserved. Normalize During Data Modeling (cont) ORDER #* id * date of order * date of order * customer id * customer id * customer name * customer name * state * state for the submitter of CUSTOMER #* id * name * name * state * stateORDER #* id * date of order * date of order Verify attribute placement to ensure a normalized table design. Third Normal Form Rule No non-key column can be functionally dependent upon another non-key column. Corresponding Data Modeling Rule No non-UID attribute can be dependent upon another non-UID attribute. The attributes customer name and state are dependent upon the customer id. Create another entity called CUSTOMER with a UID of customer id, and place the attributes accordingly.

Copyright Ó Oracle Corporation, All rights reserved. Normalize the Data Model First Normal Form (1NF) First Normal Form (1NF) – All Attributes must be single-valued Second Normal Form (2NF) Second Normal Form (2NF) – An attribute must be dependent upon its entity ’ s entire unique identifier Third Normal Form (3NF) Third Normal Form (3NF) – No non-UID attribute can be dependent on another non-UID attribute A normalized entity-relationship data model automatically translates into a normalized relational database design! Normalization is a relational database concept, but its principles apply to Conceptual Data Modelling. 4-4

Copyright Ó Oracle Corporation, All rights reserved. First Normal Form Single-valued attributes Validate that each attribute has a single value for each occurrence of the entity. No attribute should have repeating values. CLIENT #* identifier * date contacted * date contacted Does the entity CLIENT comply with 1NF? The attribute date contacted has multiple values, therefore the entity CLIENT is not in 1NF. First Normal Form Rule: All attributes must be singled-valued. 4-5

Copyright Ó Oracle Corporation, All rights reserved. First Normal Form (cont) If an attribute has multiple values, create an additional entity and relate it to the original entity with a M:1 relationship. If an attribute has multiple values, create an additional entity and relate it to the original entity with a M:1 relationship.CLIENT #* identifier CONTACT #* date contacted o location o location o result o result for the subject of 4-5

Copyright Ó Oracle Corporation, All rights reserved. Second Normal Form Dependency on entire UID Validate that each attribute is dependent on its entity ’ s entire unique identifier. Each specific instance of the UID must determine a single instance of each attribute. Validate that each attribute is dependent on its entity ’ s entire unique identifier. Each specific instance of the UID must determine a single instance of each attribute. Validate that an attribute is not dependent upon only part of its entity ’ s UID. Validate that an attribute is not dependent upon only part of its entity ’ s UID.COURSE #* code * name * name * duration * duration * fee * fee Validate placement of the COURSE entity ’ s attributes In this example, each instance of a course code determines a specific value for name, duration, and fee. The attributes are properly placed. Second Normal Form Rule: An attribute must be dependent upon its entity ’ s entire unique identifier. 4-6

Copyright Ó Oracle Corporation, All rights reserved. Second Normal Form (cont) Validate the placement of the attributes for the ACCOUNT and BANK entities Validate the placement of the attributes for the ACCOUNT and BANK entities ACCOUNTBANK #* number * name * name #* number * balance * balance * date opened * date opened * bank location * bank location managed by the manager of Are there any attributes which can be determined from a portion of its entity ’ s UID? 4-6

Copyright Ó Oracle Corporation, All rights reserved. Second Normal Form (cont) Validate the placement of the attributes for the ACCOUNT and BANK entities Validate the placement of the attributes for the ACCOUNT and BANK entities ACCOUNTBANK #* number * name * name * bank location * bank location #* number * balance * balance * date opened * date opened managed by the manager of Each instance of a BANK and account number determine specific values of balance and date opened for each account. The attribute bank location is misplaced. It is dependent on BANK but not on account number and so should be an attribute of BANK. 4-6

Copyright Ó Oracle Corporation, All rights reserved. Third Normal Form No non-UID interdependencies Validate that each non-UID attribute is not dependent upon another non-UID attribute Validate that each non-UID attribute is not dependent upon another non-UID attribute Move any non-UID attribute that is dependent upon another non-UID attribute Move any non-UID attribute that is dependent upon another non-UID attribute ORDER #* id * date of order * date of order * customer id * customer id * customer name * customer name * state * state Are any of the non-UID attributes for this entity dependent upon another non-UID attribute? Third Normal Form Rule: No non-UID attribute can be dependent upon another non-UID attribute. 4-7

Copyright Ó Oracle Corporation, All rights reserved. Third Normal Form (cont) ORDER #* id * date of order * date of order * customer id * customer id * customer name * customer name * state * state for the submitter of CUSTOMER #* id * name * name * state * state ORDER #* id * date of order * date of order The attributes customer name and state are dependent on the customer id. Create another entity called CUSTOMER with a UID of customer id and place the attributes accordingly. 4-7

Copyright Ó Oracle Corporation, All rights reserved. Exercise 4-1 For the following E-R Model, evaluate each entity against the rules of normalization, identify the misplaced attribute, and explain what rule of normalization each misplaced attribute violates. Optionally, re-draw the E-R diagram in third normal form. for completed with COURSE #* course number course name course name teacher number teacher number department code department code department name department name teacher name teacher name ENROLLMENT grade code teacher number grade description course name STUDENT #* student id last name last name first name first name for assigned 4-9