Gegevens Analyse Les 4: Normaliseren. Functional Dependency Rules If A  (B, C), then A  B and A  C If (A,B)  C, then neither A nor B determines C.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Normalization What is it?
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.
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.
Normalization of Database Tables
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.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 COS 346 Day4.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 COS 346 Day5.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 David M. Kroenke Database Processing Chapter 4 Database Design Using.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 COS 346 Day6.
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
Normalization of Database Tables
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke Database Processing Chapter 3 Normalization.
Microsoft Access 2002 By Ian Cole Lecturer in ICT.
Normalization of Database Tables
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 COS 346 Day4.
© 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 Eighth Edition Chapter 5 Normalization of Database Tables.
Database Lecture Notes Normalization 3 – Denormalization
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.
Normalization Quiz Tao Li Grant Horntvedt. 1. Which of the following statements is true: a. Normal forms can be derived by inspecting the data in various.
Chapter 3 The Relational Model and Normalization
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
SQL Normalization Database Design Lecture 5. Copyright 2006Page 2 SQL Normalization Database Design 1 st Normal Form 1 st Normal Form 2 nd Normal Form.
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.
Database Systems: Design, Implementation, and Management Tenth Edition
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 Systems: Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables.
The Relational Model and Normalization R. Nakatsu.
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 4 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 4 Normalization.
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
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.
By Abdul Rashid Ahmad. E.F. Codd proposed three normal forms: The first, second, and third normal forms 1NF, 2NF and 3NF are based on the functional dependencies.
Component 4/Unit 6d Topic IV: Design a simple relational database using data modeling and normalization Description and Information Gathering Data Model.
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 4-1 David M. Kroenke’s Chapter Four: Database.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Gegevens Analyse Les 3: Normaliseren. Chapter Premise We have received one or more tables of existing data The data is to be stored in a new database.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 What Makes Determinant Values Unique? A determinant is unique in.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Four: Database Design Using Normalization 4-1 KROENKE.
Functional dependencies and normalization 1 Normalization Functional dependencies NF + BCNF.
Database Systems, 8 th Edition Improving the Design Table structures cleaned up to eliminate initial partial and transitive dependencies Normalization.
Postgresql East Philadelphia, PA Databases – A Historical Perspective.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
1 CS 430 Database Theory Winter 2005 Lecture 7: Designing a Database Logical Level.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 5 The Relational Model and Normalization.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Four: Database Design Using Normalization.
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.
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.
Database Processing: David M. Kroenke’s Chapter Four:
Database Design Using Normalization
Database Processing: David M. Kroenke’s Chapter Three:
David M. Kroenke and David J
Presentation transcript:

Gegevens Analyse Les 4: Normaliseren

Functional Dependency Rules If A  (B, C), then A  B and A  C If (A,B)  C, then neither A nor B determines C by itself

Normal Forms 1NF – A table that qualifies as a relation is in 1NF 2NF – A relation is in 2NF if all of its nonkey attributes are dependent on all of the primary key [FW] of attribuut is afhankelijk van ander niet-sleutel-attribuut. 3NF – A relation is in 3NF if it is in 2NF and has no determinants except the primary key Boyce-Codd Normal Form (BCNF) – A relation is in BCNF if every determinant is a candidate key “I swear to construct my tables so that all nonkey columns are dependent on the key, the whole key and nothing but the key, so help me Codd.”

Multivaled Dependencies A multivaled dependency occurs when a determinant determines a particular set of values: Employee  Degree Employee  Sibling PartKit  Part The determinant of a multivaled dependency can never be a primary key

Multivaled Dependencies

Eliminating Anomolies from Multivaled Dependencies Multivalued dependencies are not a problem if they are in a separate relation, so: –Always put multivaled dependencies into their own relation –This is known as Fourth Normal Form (4NF)

De 5e, 6e, 7e….enz NF? Snel overslaan en gaan naar DKNF

Normalization: Advantages and Disadvantages

Choosing Not to Use BCNF BCNF is used to control anomalies from functional dependencies There are times when BCNF is not desirable The classic example is ZIP codes: –ZIP codes almost never change –Any anomalies are likely to be caught by normal business practices –Not having to use SQL to join data in two tables will speed up application processing

Multivaled Dependencies Anomalies from multivalued dependencies are very problematic Always place the columns of a multivalued dependency into a separate table (4NF)

Denormalization For read-only databases, normalization is seldom an advantage –Application processing speed is more important Denormalization is the joining of data in normalized tables prior to storing the data The data is then stored in non-normalized tables

Normalized Tables

Denormalizing the Data INSERT INTO PAYMENT_DATA SELECT STUDENT.SID, Name, CLUB.Club, Cost, AmtPaid FROM STUDENT, PAYMENT, CLUB WHERESTUDENT.SID = PAYMENT.SID ANDPAYMENT.Club = CLUB.Club;

Na analyse komt synthese Uitgangspunt is dat er juist maar 1 attribuut in een tabel staat en dat we dan gaan kijken welke attributen er nog meer bij mogen In plaats van splitsen wordt het nu plakken! Maar wel op basis van regels.