Normalization and Other Data Modeling Methods There are many paths to the top of the mountain but the view is always the same Chinese proverb.

Slides:



Advertisements
Similar presentations
CM20145 Further DB Design – Normalization
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Normalization and Other Data Modeling Methods There are many paths to the top of the mountain but the view is always the same Chinese proverb.
Systems Development Life Cycle
Modeling the Data: Conceptual and Logical Data Modeling
Concepts of Database Management Sixth Edition
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and Normalization.
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)
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
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.
Concepts of Database Management Seventh Edition
NORMALIZATION N. HARIKA (CSC).
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Chapter 3 The Relational Model and Normalization
Entity-Relationship modeling Transparencies
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
File and Database Design SYS364. Today’s Agenda WHTSA DBMS, RDBMS, SQL A place for everything and everything in its place. Entity Relationship Diagrams.
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Web-Enabled Decision Support Systems
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Concepts and Terminology Introduction to Database.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
This presentation prepared for MIS 421 / MBA 575 at Western Washington University. Material in this presentation drawn from Richard T. Watson, Data Management:
IT420: Database Management and Organization Normalization 31 January 2006 Adina Crăiniceanu
© 2002 by Prentice Hall 1 Database Design David M. Kroenke Database Concepts 1e Chapter 5 5.
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
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.
The Relational Model and Normalization R. Nakatsu.
Normalization. Learners Support Publications 2 Objectives u The purpose of normalization. u The problems associated with redundant data.
1 A Guide to MySQL 2 Database Design Fundamentals.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
Normalization Copyright © 1999 Patrick McDermott College of Alameda
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
1 A Guide to MySQL 2 Database Design Fundamentals.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Description and exemplification of entity-relationship modelling.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
©NIIT Normalizing and Denormalizing Data Lesson 2B / Slide 1 of 18 Objectives In this section, you will learn to: Describe the Top-down and Bottom-up approach.
Data Analysis Improving Database Design. Normalization The process of transforming a data model into a flexible, stable structure. Reduces anomalies Anomaly.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
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,
1 6 Concepts of Database Management, 5 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology Spring 2006.
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Logical Database Design and the Relational Model.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
Logical Database Design and Relational Data Model Muhammad Nasir
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
MS Access. Most A2 projects use MS Access Has sufficient depth to support a significant project. Relational Databases. Fairly easy to develop a good user.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Presentation transcript:

Normalization and Other Data Modeling Methods There are many paths to the top of the mountain but the view is always the same Chinese proverb

Normalization An alternative database design tool to data modeling A theoretical foundation for the relational model Application of a series of rules that gradually improve the design

Functional dependency A relationship between attributes in an entity One or more attributes determine the value of another attribute An identifier functionally determines all the attributes of an entity stock code  firm name, stock price, stock quantity, stock dividend If we know stock code we know the value of firm name, etc. Multivalued dependency Formulae (stock dividend, stock price)  yield

Full functional dependency Yield is fully functionally dependent on stock dividend and stock price because both of these attributes are required to determine the value of yield (stock dividend, stock price)  yield Determinant An attribute that fully functionally determines another attribute e.g., stock code determines stock PE

Multidetermination A given value can determine multiple values A multidetermines B A  e.g., Department multidetermines course Multivalued dependency means functional dependencies are multivalued

Attribute relationships one-to-one a value of an attribute determines the value of another attribute and vice versa A  B  and  B   e.g., CH  Switzerland Switzerland  CH

Attribute relationships one-to-many a value of one attribute determines the value of another attribute but not vice versa A  B e.g., country name  currency unit currency unit not  country name

Attribute relationships many-to-many neither attribute determines the other A not  B B not  A country name not  language language not  country name  French and Flemish is spoken in Belgium  French is spoken in many countries

Normal forms A classification of relations Stacked like a set of Russian dolls Innermost is first normal form

First normal form (1NF) All rows must have the same number of columns Single valued attributes only

Second normal form (2NF) Violated when a nonkey column is a fact about part of the primary key A column is not fully functionally dependent on the primary key customer-credit in this case order itemnocustomeridquantitycustomer-credit OK POOR

Third normal form (3NF) Violated when a nonkey column is a fact about another nonkey column A column is not fully functionally dependent on the primary key EXCHANGE RATE in this case stock stock codenationexchange rate MGUSA0.67 IRAUS0.46

Boyce-Codd normal form (BCNF) Arises when a table has multiple candidate keys the candidate keys are composite the candidate keys overlap advisor clientprobtypeconsultant AlphaMarketingGomez AlphaProductionRaginiski

Fourth normal form (4NF) A row should not contain two or more multivalued independent facts student studentidsportsubject… 50FootballEnglish… 50FootballMusic… 50TennisBotany… 50KarateBotany…

Fifth normal form (5NF) A table can be reconstructed from other tables There exists some rule that enables a relation to be inferred Base case Consultants provide skills to one or more firms and firms can use many consultants; a consultant has many skills and a skill can be used by many firms; and a firm can have a need for many skills and the same skill can be required by many firms

Fifth normal form (5NF) The rule If a consultant has a certain skill (e.g., database) and has a contract with the firm that requires that skill (e.g., IBM), then the consultant advises the firm on that skill (i.e., he advises IBM on database)

Domain key/ normal form (DK/NF) Key: unique identifier Constraint: rule governing attribute values Domain: set of values of the same data type Every constraint on the relation must be a logical consequence of the domain constraints and the key constraints that apply to the relation

Data modeling and normalization Data modeling is often an easier path to good database design A high-fidelity data model will be of high normal form 5NF is likely to create the most problems Check for special rules

Data modeling methods The most widely known model is Chen's entity-relationship (E-R) approach There is no standard for the E-R method Nearly all data modeling approaches are very similar because they share common concepts Learning is readily transferable between methods

An E-R diagram

IDEF1X

IDEF1X Generalization hierarchy

Representing relationships The various dialects are most distinctive in the ways in which relationships are represented Mandatory or optional Cardinality

Mandatory or optional relationship Does an occurrence of this entity require an occurrence of the other entity? Consider sale order and item Item is mandatory for a sales order Sales order is optional for an item

Cardinality Meaning 0,1OptionalThere can be zero or one occurrence of the entity relative to the other entity 0,nThere can be zero or many occurrences of the entity relative to the other entity 1,1MandatoryOne occurrence of the entity has one occurrence relative to the other entity 1,nOne occurrence of the entity can have many occurrences relative to the other entity

Goal Learn to think like a data modeler Different dialects and greater precision (e.g., cardinality) come easily once the basics are mastered

Key points Normalization is one approach to data modeling The are multiple representations for data model Learning to model is difficult Learning to represent a model is easy