© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.

Slides:



Advertisements
Similar presentations
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2003 Dragomir R. Radev.
Advertisements

Chapter 3 : Relational Model
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and Normalization.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 COS 346 Day 5.
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.
Database Normalization Il-Han Yoo CS 157A Professor: Sin-Min Lee.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke Database Processing Chapter 3 Normalization.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 COS 346 Day4.
Chapter 5 Normalization of Database Tables
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
July 14, 2015ICS 424: recap1 Relational Database Design: Recap of ICS 324.
NORMALIZATION N. HARIKA (CSC).
Normalization II. Boyce–Codd Normal Form (BCNF) Based on functional dependencies that take into account all candidate keys in a relation, however BCNF.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Chapter 3 The Relational Model and Normalization
(C) 2000, The University of Michigan 1 Database Application Design Handout #3 January 21, 2000.
Lecture 12 Inst: Haya Sammaneh
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Database Design Chapter Five DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
(C) 2000, The University of Michigan 1 Database Application Design Handout #4 January 28, 2000.
Chapter 5 The Relational Model and Normalization David M. Kroenke Database Processing © 2000 Prentice Hall.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
IT420: Database Management and Organization Normalization 31 January 2006 Adina Crăiniceanu
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 4 This material was developed by Oregon Health & Science.
© 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.
Database Management COP4540, SCS, FIU Relation Normalization (Chapter 14)
The Relational Model and Normalization R. Nakatsu.
1 A Guide to MySQL 2 Database Design Fundamentals.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Normalization Copyright © 1999 Patrick McDermott College of Alameda
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
The Relational Model and Normalization The Relational Model Normalization First Through Fifth Normal Forms Domain/Key Normal Form The Synthesis of Relations.
CSE314 Database Systems Basics of Functional Dependencies and Normalization for Relational Databases Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Component 4/Unit 6d Topic IV: Design a simple relational database using data modeling and normalization Description and Information Gathering Data Model.
Data Analysis Improving Database Design. Normalization The process of transforming a data model into a flexible, stable structure. Reduces anomalies Anomaly.
Relational Model & Normalization Relational terminology Anomalies and the need for normalization Normal forms Relation synthesis De-normalization.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
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 MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 What Makes Determinant Values Unique? A determinant is unique in.
1 CS 430 Database Theory Winter 2005 Lecture 7: Designing a Database Logical Level.
Microsoft Access 2010 Chapter 11 Database Design.
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Three: 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.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
Huffman Trucking Fleet Vehicle Maintenance Database DBM380 June 13, 2012 Learning Team B.
5. The Relational Model and Normalization 5.1 Relational Model5.2 Normalization 5.3 1NF to 5NF 5.4 Domain/Key Normalization 5.5 Synthesis of Relation 5.6.
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.
Normal Forms 1NF – A table that qualifies as a relation is in 1NF. (Back)(Back) 2NF – A relation is in 2NF if all of its nonkey attributes are dependent.
Adapted from DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 Functional Dependencies and Normalization.
CSIS 115 Database Design and Applications for Business
Advanced Normalization
Normalization Karolina muszyńska
Advanced Normalization
The Relational Model and Normalization
Relational Model and ER Model: in a Nutshell
Chapter 4 The Relational Model and Normalization
Presentation transcript:

© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization

© 2002 by Prentice Hall 2 The Relational Model Broad, flexible model Basis for almost all DBMS products E.F. Codd defined well-structured “normal forms” of relations, “normalization”

© 2002 by Prentice Hall 3 Components of the Relational Model Relation –A two-dimensional table consisting of rows and columns Tuples –The rows (or records) in a relation Attributes –The columns (or fields) in a relation

© 2002 by Prentice Hall 4 Terminology

© 2002 by Prentice Hall 5 Functional Dependency Functional dependencies are the relationships among the attributes within a relation. If attribute A functional depends on attribute B, then for every instance of B you will know the respective value of A.

© 2002 by Prentice Hall 6 Functional Dependency Notation Major is functionally dependent on SID SID  Major Grade is functionally dependent on the combination of SID and ClassID (SID, ClassID)  Grade

© 2002 by Prentice Hall 7 Functional Dependency – an Example EmployeeNumber  Name EmployeeNumber  Age EmployeeNumber  Sex

© 2002 by Prentice Hall 8 A Key A key is a group of one or more attributes that uniquely identifies a tuple

© 2002 by Prentice Hall 9 A Combination Key Sometimes more than one attribute will be required to uniquely identify a tuple. If a key consists of more than one attribute, it is called a combination (or composite) key.

© 2002 by Prentice Hall 10 Example of a Combination Key

© 2002 by Prentice Hall 11 Normalization Normalization is a process of evaluating and converting a relation to reduce modification anomalies Essentially, normalization detects and eliminates data redundancy

© 2002 by Prentice Hall 12 An Anomaly An anomaly is an undesirable consequence of a data modification.

© 2002 by Prentice Hall 13 Normal Forms Normal forms are state-classes of relations which identify the level of anomaly-avoidance

© 2002 by Prentice Hall 14 Normal Forms Levels 1NF –First Normal Form 2NF –Second Normal Form 3NF –Third Normal Form BCNF –Boyce-Codd Normal Form 4NF –Fourth Normal Form 5NF –Fifth Normal Form DK/NF –Domain/Key Normal Form

© 2002 by Prentice Hall 15 First Normal Form (1NF) To be in First Normal Form (1NF) a relation must have only single-valued attributes -- neither repeating groups nor arrays are permitted

© 2002 by Prentice Hall 16 Second Normal Form (2NF) To be in Second Normal Form (2NF) the relation must be in 1NF and each nonkey attribute must be dependent on the whole key (not a subset of the key)

© 2002 by Prentice Hall 17 Third Normal Form (3NF) To be in Third Normal Form (3NF) the relation must be in 2NF and no transitive dependencies may exist within the relation. A transitive dependency is when an attribute is indirectly functionally dependent on the key (that is, the dependency is through another nonkey attribute)

© 2002 by Prentice Hall 18 Violation of 3NF

© 2002 by Prentice Hall 19 Boyce-Codd Normal Form (BCNF) To be in Boyce-Codd Normal Form (BCNF) the relation must be in 3NF and every determinant must be a candidate key.

© 2002 by Prentice Hall 20 Fourth Normal Form (4NF) To be in Fourth Normal Form (4NF) the relation must be in BCNF and the relation may not contain multi-valued dependencies.

© 2002 by Prentice Hall 21 Fifth Normal Form (5NF) The Fifth Normal Form concerns dependencies that are obscure and beyond the scope of this text.

© 2002 by Prentice Hall 22 Domain/Key Normal Form (DK/NF) To be in Domain/Key Normal Form (DK/NF) every constraint on the relation must be a logical consequence of the definition of keys and domains.

© 2002 by Prentice Hall 23 DK/NF Terminology Constraint –A rule governing static values of attributes Key –A unique identifier of a tuple Domain –A description of an attribute’s allowable values

© 2002 by Prentice Hall 24  DK/NF Example Domain/Key Definition of Example Above 

© 2002 by Prentice Hall 25 DK/NF Example

© 2002 by Prentice Hall 26 DK/NF Example

© 2002 by Prentice Hall 27 Summary of Normal Forms

© 2002 by Prentice Hall 28 Synthesis of Relations A  B and B  Aone-to-one A  B but B not  Amany-to-one A not  B and B not  Amany-to-many

© 2002 by Prentice Hall 29 Summary of Attribute Relationships

© 2002 by Prentice Hall 30 Optimization De-Normalization (a.k.a., Controlled Redundancy)

© 2002 by Prentice Hall 31 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization