Avoiding Database Anomalies

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

Database Tables and Normalization
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
 Definition  Components  Advantages  Limitations Contents  Definition Definition  Normal Forms Normal Forms  First Normal Form First Normal Form.
Normalisation Ensuring data integrity in database design 1.
Accounting 6500 Relational Databases: Accounting Applications Introduction to Normalization.
Need for Normalization
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.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: 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.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Chapter 5 Normalization of Database Tables
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 3 Objectives: Identifying and Eliminating Database.
Lecture 12 Inst: Haya Sammaneh
Functional Dependence An attribute A is functionally dependent on attribute(s) B if: given a value b for B there is one and only one corresponding value.
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Module Title? DBMS Normalization. Module Title? DBMS Normalization  Normalization is the process of removing redundant data from tables in order to improve.
Concepts of Database Management Sixth Edition Chapter 5 Database Design 1: Normalization.
Concepts of Database Management, Fifth Edition
A Normalisation Example Mark Kelly McKinnon Secondary College Vceit.com Based on work by Robert Timmer-Arends.
Normalization. We will take a look at –First Normal Form –Second Normal Form –Third Normal Form There are also –Boyce-Codd, Fourth and Fifth normal forms.
資料庫正規化 Database Normalization 取材自 AIS, 6 th edition By Gelinas et al.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Data Models and Relational Databases Chapter 2. Learning Objectives Identify primary and foreign keys for each entity and relevant relationships in the.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
BIS 360 – Lecture Eight Ch. 12: Database Design and Normalization.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
Object-Relational Modeling. What Is a Relational Data Model? Based on the concept of relations (tables of data) Relationships established by matching.
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Database Design – Lecture 8
1 5 Chapter 5 Database Design 1: Some Normalization Examples Spring 2006.
Normalization Transparencies 1. ©Pearson Education 2009 Objectives How the technique of normalization is used in database design. How tables that contain.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Design – Lecture 9 Normalization Continued.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
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 Example. Database Systems, 8 th Edition 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures.
Concepts of Database Management Seventh Edition Chapter 5 Database Design 1: Normalization.
IST Database Normalization Todd Bacastow IST 210.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
6-1 © Prentice Hall, 2007 Topic 6: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
8-1 © Prentice Hall, 2007 Chapter 8: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
Lecture 4: Logical Database Design and the Relational Model 1.
Normalization. Overview Earliest  formalized database design technique and at one time was the starting point for logical database design. Today  is.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
Database Architecture Normalization. Purpose of Normalization A technique for producing a set of relations with desirable properties, given the data requirements.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
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.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
Normalisation Worked example for an Order Remember : The data should depend upon the key, the whole key and nothing but the key.
Normalizing Database Designs. 2 Objectives In this chapter, students will learn: –What normalization is and what role it plays in the database design.
SEEM3430: Information Systems Analysis and Design
A brief summary of database normalization
Relational Model and ER Model: in a Nutshell
Database Normalization.
Chapter 14 Normalization Pearson Education © 2009.
Presentation transcript:

Avoiding Database Anomalies

Unnormalized Relation

3a. First Normal Form (1NF) A relation is in first normal form if it does not contain repeating groups.

Unnormalized Relation

Changes to service names on each line on which the First Normal Form (1NF) Changes to service names have to be made on each line on which the the name appears.

Inconsistent data could result when the same service name First Normal Form (1NF) Inconsistent data could result when the same service name has several name variations.

can not be added unless there is an existing transaction. First Normal Form (1NF) New services can not be added unless there is an existing transaction.

Deletion of an invoice could First Normal Form (1NF) Deletion of an invoice could result in a loss of service information.

Second Normal Form (2NF) A relation is in second normal form if it is in first normal form and there are no partial dependencies. A partial dependency occurs when a table has a composite primary key and a non-key attribute is dependent on only part of the primary key.

Relations in Second Normal Form (2NF) Changes to customer names have to be made on each line on which the customer appears.

Relations in Second Normal Form (2NF) Inconsistent data could result when the same customer has several name variations.

Relations in Second Normal Form (2NF) New customers can not be added unless there is an existing transaction for the customer.

Relations in Second Normal Form (2NF) Deletion of an invoice could result in the loss of customer information.

Third Normal Form (3NF) A relation is in third normal form if it is in second normal form and there are no transitive dependencies. A transitive dependency occurs when a table has a non-key attribute that is dependent on another non-key attribute.

Relations in Third Normal Form (3NF)

REVENUE TRANSACTION LINES Table Relationships 1-M Relationship REVENUE TRANSACTIONS CUSTOMER ACCOUNTS Invoice # Transaction Date Customer # Customer # Customer Name Foreign Key M-N Relationship REVENUE TRANSACTIONS SERVICES Invoice # Transaction Date Customer # Service Type # Service Name Hourly Rate 1 1 Bridge Table REVENUE TRANSACTION LINES M M Invoice # Service Type # Hours

Success!