Some Normalization Examples

Slides:



Advertisements
Similar presentations
Database Design: Normalization J.G. Zheng June 29 th 2005 DB Chapter 4.
Advertisements

Normalisation.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
BTM 382 Database Management Chapter 6: Normalization of Database Tables Chitu Okoli Associate Professor in Business Technology Management John Molson School.
Chapter 5 Normalization of Database Tables
Accounting 6500 Relational Databases: Accounting Applications Introduction to Normalization.
Information Resources Management March 13, Agenda n Administrivia n Normalization n Homework #7 n Mid-Term #2.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
CS263:Revision on Normalisation
Chapter 5 Normalization of Database Tables
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
NORMALIZATION N. HARIKA (CSC).
Chapter 5 Normalization of Database Tables
Chapter 4: Logical Database Design and the Relational Model (Part II)
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Avoiding Database 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.
Normalisation Mia’s Sandwich Shop The Process Explained.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
1 5 Normalization. 2 5 Database Design Give some body of data to be represented in a database, how do we decide on a suitable logical structure for that.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
1 5 Chapter 5 Database Design 1: Some Normalization Examples Spring 2006.
Database Design – Lecture 9 Normalization Continued.
Normalization. 2 u Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data,
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Normalization Example. Database Systems, 8 th Edition 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures.
PMIT-6102 Advanced Database Systems
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Normalization Hour1,2 Presented & Modified by Mahmoud Rafeek Alfarra.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
IT-501 Database Management Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Logical Database Design and Relational Data Model Muhammad Nasir
Chapter 4 © 2013 Pearson Education, Inc. Publishing as Prentice Hall Chapter 4: Logical Database Design and the Relational Model Modern Database Management.
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
Lecture # 17 Chapter # 10 Normalization Database Systems.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 4: PART C LOGICAL.
Attributes and Domains
SEEM3430: Information Systems Analysis and Design
Normalization Karolina muszyńska
Modern Database Management Jeff Hoffer, Ramesh Venkataraman,
Chapter 5: Logical Database Design and the Relational Model
MIS 322 – Enterprise Business Process Analysis
Payroll Management System
Example Question–Is this relation Well Structured? Student
Unit 4: Normalization of Relations
Normalization 2NF & 3NF Presented by: Dr. Samir Tartir
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Entity relationship diagrams
CSCI 2141 – Intro to Database Systems Database Normalization
Normalization and Databases
Normalization – Part II
Some Normalization Examples
A Normalization Example
Rob Gleasure IS6125 Database Analysis and Design Lecture 11: Normalization of Data Tables Rob Gleasure
CS 3630 Database Design and Implementation
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Chapter 8 – Part2 Database Design.
Chapter 8 – Part2 Database Design.
Sampath Jayarathna Cal Poly Pomona
NORMALIZATION FIRST NORMAL FORM (1NF):
Logical Data Modeling – Normalization
Lecture 04 Normalization.
Database Normalization.
Chapter 14 Normalization Pearson Education © 2009.
Presentation transcript:

Some Normalization Examples Chapter 5 Database Design 1: Some Normalization Examples Spring 2006

Dependencies: Definitions Multivalued Attributes (or repeating groups): non-key attributes or groups of non-key attributes the values of which are not uniquely identified by (directly or indirectly) (not functionally dependent on) the value of the Primary Key (or its part).

Dependencies: Definitions Partial Dependency – when an non-key attribute is determined by a part, but not the whole, of a COMPOSITE primary key. Partial Dependency

Dependencies: Definitions Transitive Dependency – when a non-key attribute determines another non-key attribute. Transitive Dependency

Normal Forms: Review Unnormalized – There are multivalued attributes or repeating groups 1 NF – No multivalued attributes or repeating groups. 2 NF – 1 NF plus no partial dependencies 3 NF – 2 NF plus no transitive dependencies

Example 1: Determine NF ISBN  Title ISBN  Publisher All attributes are directly or indirectly determined by the primary key; therefore, the relation is at least in 1 NF ISBN  Title ISBN  Publisher Publisher  Address

Example 1: Determine NF ISBN  Title ISBN  Publisher The relation is at least in 1NF. There is no COMPOSITE primary key, therefore there can’t be partial dependencies. Therefore, the relation is at least in 2NF ISBN  Title ISBN  Publisher Publisher  Address

Example 1: Determine NF ISBN  Title ISBN  Publisher Publisher is a non-key attribute, and it determines Address, another non-key attribute. Therefore, there is a transitive dependency, which means that the relation is NOT in 3 NF. ISBN  Title ISBN  Publisher Publisher  Address

Example 1: Determine NF ISBN  Title ISBN  Publisher We know that the relation is at least in 2NF, and it is not in 3 NF. Therefore, we conclude that the relation is in 2NF. ISBN  Title ISBN  Publisher Publisher  Address

Example 1: Determine NF ISBN  Title ISBN  Publisher In your solution you will write the following justification: No M/V attributes, therefore at least 1NF No partial dependencies, therefore at least 2NF There is a transitive dependency (Publisher  Address), therefore, not 3NF Conclusion: The relation is in 2NF ISBN  Title ISBN  Publisher Publisher  Address

Example 2: Determine NF Product_ID  Description All attributes are directly or indirectly determined by the primary key; therefore, the relation is at least in 1 NF

The relation is at least in 1NF. Example 2: Determine NF Product_ID  Description The relation is at least in 1NF. There is a COMPOSITE Primary Key (PK) (Order_No, Product_ID), therefore there can be partial dependencies. Product_ID, which is a part of PK, determines Description; hence, there is a partial dependency. Therefore, the relation is not 2NF. No sense to check for transitive dependencies!

Example 2: Determine NF Product_ID  Description We know that the relation is at least in 1NF, and it is not in 2 NF. Therefore, we conclude that the relation is in 1 NF.

Example 2: Determine NF Product_ID  Description In your solution you will write the following justification: 1) No M/V attributes, therefore at least 1NF 2) There is a partial dependency (Product_ID  Description), therefore not in 2NF Conclusion: The relation is in 1NF

Example 3: Determine NF Part_ID  Description Part_ID  Price Comp_ID and No are not determined by the primary key; therefore, the relation is NOT in 1 NF. No sense in looking at partial or transitive dependencies. Part_ID  Description Part_ID  Price Part_ID, Comp_ID  No

Example 3: Determine NF Part_ID  Description Part_ID  Price In your solution you will write the following justification: There are M/V attributes; therefore, not 1NF Conclusion: The relation is not normalized. Part_ID  Description Part_ID  Price Part_ID, Comp_ID  No

Bringing a Relation to 1NF

Bringing a Relation to 1NF Option 1: Make a determinant of the repeating group (or the multivalued attribute) a part of the primary key. Composite Primary Key

Bringing a Relation to 1NF Option 2: Remove the entire repeating group from the relation. Create another relation which would contain all the attributes of the repeating group, plus the primary key from the first relation. In this new relation, the primary key from the original relation and the determinant of the repeating group will comprise a primary key.

Bringing a Relation to 1NF

Bringing a Relation to 2NF Composite Primary Key

Bringing a Relation to 2NF Goal: Remove Partial Dependencies Partial Dependencies Composite Primary Key

Bringing a Relation to 2NF Remove attributes that are dependent from the part but not the whole of the primary key from the original relation. For each partial dependency, create a new relation, with the corresponding part of the primary key from the original as the primary key.

Bringing a Relation to 2NF

Bringing a Relation to 3NF Goal: Get rid of transitive dependencies. Transitive Dependency

Bringing a Relation to 3NF Remove the attributes, which are dependent on a non-key attribute, from the original relation. For each transitive dependency, create a new relation with the non-key attribute which is a determinant in the transitive dependency as a primary key, and the dependent non-key attribute as a dependent.

Bringing a Relation to 3NF